From dc908e8999fbc70aa8b9fe558006fae8ead8949d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 1 Aug 2026 03:01:50 +0000 Subject: [PATCH 1/2] feat: Upgrade protobuf to v33.2 PiperOrigin-RevId: 957421846 Source-Link: https://github.com/googleapis/googleapis/commit/3f9c9d72cb20768ca4ac9f12030faaf43b13c231 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c23500d1c37abe09bfee31f6c607713504f41d06 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByb2R1Y3RfcmVnaXN0cnkvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByb2ZpbGVyLy5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJhcGlkX21pZ3JhdGlvbl9hc3Nlc3NtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYV9lbnRlcnByaXNlLy5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGF0aW9uX2VuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGVyLy5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXIvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlZGlzLy5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJlc291cmNlX21hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXJ1bi1jbGllbnQvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNhYXNfcGxhdGZvcm0tc2Fhc19zZXJ2aWNlX21nbXQvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3JldF9tYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyZV9zb3VyY2VfbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXByaXZhdGVfY2EvLk93bEJvdC55YW1sIiwiaCI6ImMyMzUwMGQxYzM3YWJlMDliZmVlMzFmNmM2MDc3MTM1MDRmNDFkMDYifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXB1YmxpY19jYS8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlcl9tYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiJjMjM1MDBkMWMzN2FiZTA5YmZlZTMxZjZjNjA3NzEzNTA0ZjQxZDA2In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfY29udHJvbC8uT3dsQm90LnlhbWwiLCJoIjoiYzIzNTAwZDFjMzdhYmUwOWJmZWUzMWY2YzYwNzcxMzUwNGY0MWQwNiJ9 --- .../google-cloud-product_registry/.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../google-cloud-product_registry/.toys.rb | 28 + .../google-cloud-product_registry/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../google-cloud-product_registry/Gemfile | 32 + .../google-cloud-product_registry/LICENSE.md | 201 ++++ .../google-cloud-product_registry/README.md | 141 +++ .../google-cloud-product_registry/Rakefile | 169 ++++ .../google-cloud-product_registry.gemspec | 27 + .../lib/google-cloud-product_registry.rb | 19 + .../lib/google/cloud/product_registry.rb | 158 +++ .../google/cloud/product_registry/version.rb | 26 + .../cloud/product_registry/client_test.rb | 64 ++ .../cloud/product_registry/version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-profiler/.gitignore | 20 + .../google-cloud-profiler/.repo-metadata.json | 18 + .../google-cloud-profiler/.rubocop.yml | 39 + .../google-cloud-profiler/.toys.rb | 28 + .../google-cloud-profiler/.yardopts | 11 + .../google-cloud-profiler/AUTHENTICATION.md | 122 +++ .../google-cloud-profiler/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-profiler/Gemfile | 32 + .../google-cloud-profiler/LICENSE.md | 201 ++++ .../google-cloud-profiler/README.md | 142 +++ .../google-cloud-profiler/Rakefile | 169 ++++ .../google-cloud-profiler.gemspec | 27 + .../lib/google-cloud-profiler.rb | 19 + .../lib/google/cloud/profiler.rb | 232 +++++ .../lib/google/cloud/profiler/version.rb | 26 + .../test/google/cloud/profiler/client_test.rb | 85 ++ .../google/cloud/profiler/version_test.rb | 26 + .../google-cloud-profiler/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ ...e-cloud-rapid_migration_assessment.gemspec | 27 + ...google-cloud-rapid_migration_assessment.rb | 19 + .../cloud/rapid_migration_assessment.rb | 157 +++ .../rapid_migration_assessment/version.rb | 26 + .../rapid_migration_assessment/client_test.rb | 64 ++ .../version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../google-cloud-recaptcha_enterprise/Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ .../google-cloud-recaptcha_enterprise.gemspec | 27 + .../lib/google-cloud-recaptcha_enterprise.rb | 19 + .../lib/google/cloud/recaptcha_enterprise.rb | 148 +++ .../cloud/recaptcha_enterprise/version.rb | 26 + .../cloud/recaptcha_enterprise/client_test.rb | 53 + .../recaptcha_enterprise/version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ ...google-cloud-recommendation_engine.gemspec | 27 + .../lib/google-cloud-recommendation_engine.rb | 19 + .../lib/google/cloud/recommendation_engine.rb | 371 +++++++ .../cloud/recommendation_engine/version.rb | 26 + .../recommendation_engine/client_test.rb | 127 +++ .../recommendation_engine/version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-recommender/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-recommender/.rubocop.yml | 39 + .../google-cloud-recommender/.toys.rb | 28 + .../google-cloud-recommender/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../google-cloud-recommender/CHANGELOG.md | 2 + .../google-cloud-recommender/Gemfile | 32 + .../google-cloud-recommender/LICENSE.md | 201 ++++ .../google-cloud-recommender/README.md | 142 +++ .../google-cloud-recommender/Rakefile | 169 ++++ .../google-cloud-recommender.gemspec | 27 + .../lib/google-cloud-recommender.rb | 19 + .../lib/google/cloud/recommender.rb | 160 +++ .../lib/google/cloud/recommender/version.rb | 26 + .../google/cloud/recommender/client_test.rb | 64 ++ .../google/cloud/recommender/version_test.rb | 26 + .../google-cloud-recommender/test/helper.rb | 35 + .../google-cloud-redis-cluster/.gitignore | 20 + .../.repo-metadata.json | 17 + .../google-cloud-redis-cluster/.rubocop.yml | 39 + .../google-cloud-redis-cluster/.toys.rb | 28 + .../google-cloud-redis-cluster/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../google-cloud-redis-cluster/CHANGELOG.md | 2 + .../google-cloud-redis-cluster/Gemfile | 32 + .../google-cloud-redis-cluster/LICENSE.md | 201 ++++ .../google-cloud-redis-cluster/README.md | 141 +++ .../google-cloud-redis-cluster/Rakefile | 169 ++++ .../google-cloud-redis-cluster.gemspec | 27 + .../lib/google-cloud-redis-cluster.rb | 19 + .../lib/google/cloud/redis/cluster.rb | 173 ++++ .../lib/google/cloud/redis/cluster/version.rb | 28 + .../google/cloud/redis/cluster/client_test.rb | 64 ++ .../cloud/redis/cluster/version_test.rb | 26 + .../google-cloud-redis-cluster/test/helper.rb | 35 + owl-bot-staging/google-cloud-redis/.gitignore | 20 + .../google-cloud-redis/.repo-metadata.json | 18 + .../google-cloud-redis/.rubocop.yml | 39 + owl-bot-staging/google-cloud-redis/.toys.rb | 28 + owl-bot-staging/google-cloud-redis/.yardopts | 11 + .../google-cloud-redis/AUTHENTICATION.md | 122 +++ .../google-cloud-redis/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-redis/Gemfile | 32 + owl-bot-staging/google-cloud-redis/LICENSE.md | 201 ++++ owl-bot-staging/google-cloud-redis/README.md | 142 +++ owl-bot-staging/google-cloud-redis/Rakefile | 169 ++++ .../google-cloud-redis.gemspec | 27 + .../lib/google-cloud-redis.rb | 19 + .../lib/google/cloud/redis.rb | 171 ++++ .../lib/google/cloud/redis/version.rb | 26 + .../test/google/cloud/redis/client_test.rb | 64 ++ .../test/google/cloud/redis/version_test.rb | 26 + .../google-cloud-redis/test/helper.rb | 35 + .../google-cloud-resource_manager/.gitignore | 20 + .../.repo-metadata.json | 15 + .../.rubocop.yml | 39 + .../google-cloud-resource_manager/.toys.rb | 28 + .../google-cloud-resource_manager/.yardopts | 12 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../google-cloud-resource_manager/Gemfile | 32 + .../google-cloud-resource_manager/LICENSE.md | 201 ++++ .../google-cloud-resource_manager/README.md | 147 +++ .../google-cloud-resource_manager/Rakefile | 169 ++++ .../google-cloud-resource_manager.gemspec | 27 + .../lib/google-cloud-resource_manager.rb | 19 + .../lib/google/cloud/resource_manager.rb | 584 +++++++++++ .../google/cloud/resource_manager/version.rb | 26 + .../cloud/resource_manager/client_test.rb | 190 ++++ .../cloud/resource_manager/version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-retail/.gitignore | 20 + .../google-cloud-retail/.repo-metadata.json | 18 + .../google-cloud-retail/.rubocop.yml | 39 + owl-bot-staging/google-cloud-retail/.toys.rb | 28 + owl-bot-staging/google-cloud-retail/.yardopts | 11 + .../google-cloud-retail/AUTHENTICATION.md | 122 +++ .../google-cloud-retail/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-retail/Gemfile | 32 + .../google-cloud-retail/LICENSE.md | 201 ++++ owl-bot-staging/google-cloud-retail/README.md | 142 +++ owl-bot-staging/google-cloud-retail/Rakefile | 169 ++++ .../google-cloud-retail.gemspec | 27 + .../lib/google-cloud-retail.rb | 19 + .../lib/google/cloud/retail.rb | 950 ++++++++++++++++++ .../lib/google/cloud/retail/version.rb | 26 + .../test/google/cloud/retail/client_test.rb | 295 ++++++ .../test/google/cloud/retail/version_test.rb | 26 + .../google-cloud-retail/test/helper.rb | 35 + .../google-cloud-run-client/.gitignore | 20 + .../.repo-metadata.json | 17 + .../google-cloud-run-client/.rubocop.yml | 39 + .../google-cloud-run-client/.toys.rb | 28 + .../google-cloud-run-client/.yardopts | 11 + .../google-cloud-run-client/AUTHENTICATION.md | 122 +++ .../google-cloud-run-client/CHANGELOG.md | 2 + .../google-cloud-run-client/Gemfile | 32 + .../google-cloud-run-client/LICENSE.md | 201 ++++ .../google-cloud-run-client/README.md | 142 +++ .../google-cloud-run-client/Rakefile | 169 ++++ .../google-cloud-run.gemspec | 27 + .../lib/google-cloud-run.rb | 19 + .../lib/google/cloud/run.rb | 647 ++++++++++++ .../lib/google/cloud/run/version.rb | 26 + .../test/google/cloud/run/client_test.rb | 211 ++++ .../test/google/cloud/run/version_test.rb | 26 + .../google-cloud-run-client/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ ...ud-saas_platform-saas_service_mgmt.gemspec | 27 + ...e-cloud-saas_platform-saas_service_mgmt.rb | 19 + .../cloud/saas_platform/saas_service_mgmt.rb | 229 +++++ .../saas_service_mgmt/version.rb | 28 + .../saas_service_mgmt/client_test.rb | 85 ++ .../saas_service_mgmt/version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-scheduler/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-scheduler/.rubocop.yml | 39 + .../google-cloud-scheduler/.toys.rb | 28 + .../google-cloud-scheduler/.yardopts | 11 + .../google-cloud-scheduler/AUTHENTICATION.md | 122 +++ .../google-cloud-scheduler/CHANGELOG.md | 2 + .../google-cloud-scheduler/Gemfile | 32 + .../google-cloud-scheduler/LICENSE.md | 201 ++++ .../google-cloud-scheduler/README.md | 142 +++ .../google-cloud-scheduler/Rakefile | 169 ++++ .../google-cloud-scheduler.gemspec | 27 + .../lib/google-cloud-scheduler.rb | 19 + .../lib/google/cloud/scheduler.rb | 158 +++ .../lib/google/cloud/scheduler/version.rb | 26 + .../google/cloud/scheduler/client_test.rb | 64 ++ .../google/cloud/scheduler/version_test.rb | 26 + .../google-cloud-scheduler/test/helper.rb | 35 + .../google-cloud-secret_manager/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-secret_manager/.rubocop.yml | 39 + .../google-cloud-secret_manager/.toys.rb | 28 + .../google-cloud-secret_manager/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../google-cloud-secret_manager/CHANGELOG.md | 2 + .../google-cloud-secret_manager/Gemfile | 32 + .../google-cloud-secret_manager/LICENSE.md | 201 ++++ .../google-cloud-secret_manager/README.md | 142 +++ .../google-cloud-secret_manager/Rakefile | 169 ++++ .../google-cloud-secret_manager.gemspec | 27 + .../lib/google-cloud-secret_manager.rb | 19 + .../lib/google/cloud/secret_manager.rb | 154 +++ .../google/cloud/secret_manager/version.rb | 26 + .../cloud/secret_manager/client_test.rb | 53 + .../cloud/secret_manager/version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ ...google-cloud-secure_source_manager.gemspec | 27 + .../lib/google-cloud-secure_source_manager.rb | 19 + .../lib/google/cloud/secure_source_manager.rb | 159 +++ .../cloud/secure_source_manager/version.rb | 26 + .../secure_source_manager/client_test.rb | 64 ++ .../secure_source_manager/version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../google-cloud-security-private_ca/.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../google-cloud-security-private_ca/Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../google-cloud-security-private_ca/Rakefile | 169 ++++ .../google-cloud-security-private_ca.gemspec | 27 + .../lib/google-cloud-security-private_ca.rb | 19 + .../lib/google/cloud/security/private_ca.rb | 161 +++ .../cloud/security/private_ca/version.rb | 28 + .../cloud/security/private_ca/client_test.rb | 64 ++ .../cloud/security/private_ca/version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../google-cloud-security-public_ca/.toys.rb | 28 + .../google-cloud-security-public_ca/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../google-cloud-security-public_ca/Gemfile | 32 + .../LICENSE.md | 201 ++++ .../google-cloud-security-public_ca/README.md | 142 +++ .../google-cloud-security-public_ca/Rakefile | 169 ++++ .../google-cloud-security-public_ca.gemspec | 27 + .../lib/google-cloud-security-public_ca.rb | 19 + .../lib/google/cloud/security/public_ca.rb | 161 +++ .../cloud/security/public_ca/version.rb | 28 + .../cloud/security/public_ca/client_test.rb | 64 ++ .../cloud/security/public_ca/version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-security_center/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-security_center/.rubocop.yml | 39 + .../google-cloud-security_center/.toys.rb | 28 + .../google-cloud-security_center/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../google-cloud-security_center/CHANGELOG.md | 2 + .../google-cloud-security_center/Gemfile | 32 + .../google-cloud-security_center/LICENSE.md | 201 ++++ .../google-cloud-security_center/README.md | 144 +++ .../google-cloud-security_center/Rakefile | 169 ++++ .../google-cloud-security_center.gemspec | 28 + .../lib/google-cloud-security_center.rb | 19 + .../lib/google/cloud/security_center.rb | 157 +++ .../google/cloud/security_center/version.rb | 26 + .../cloud/security_center/client_test.rb | 64 ++ .../cloud/security_center/version_test.rb | 26 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../CHANGELOG.md | 2 + .../Gemfile | 32 + .../LICENSE.md | 201 ++++ .../README.md | 142 +++ .../Rakefile | 169 ++++ ...e-cloud-security_center_management.gemspec | 27 + ...google-cloud-security_center_management.rb | 19 + .../cloud/security_center_management.rb | 157 +++ .../security_center_management/version.rb | 26 + .../security_center_management/client_test.rb | 64 ++ .../version_test.rb | 26 + .../test/helper.rb | 35 + .../google-cloud-service_control/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-service_control/.rubocop.yml | 39 + .../google-cloud-service_control/.toys.rb | 28 + .../google-cloud-service_control/.yardopts | 11 + .../AUTHENTICATION.md | 122 +++ .../google-cloud-service_control/CHANGELOG.md | 2 + .../google-cloud-service_control/Gemfile | 32 + .../google-cloud-service_control/LICENSE.md | 201 ++++ .../google-cloud-service_control/README.md | 142 +++ .../google-cloud-service_control/Rakefile | 169 ++++ .../google-cloud-service_control.gemspec | 27 + .../lib/google-cloud-service_control.rb | 19 + .../lib/google/cloud/service_control.rb | 234 +++++ .../google/cloud/service_control/version.rb | 26 + .../cloud/service_control/client_test.rb | 85 ++ .../cloud/service_control/version_test.rb | 26 + .../test/helper.rb | 35 + 360 files changed, 25553 insertions(+) create mode 100644 owl-bot-staging/google-cloud-product_registry/.gitignore create mode 100644 owl-bot-staging/google-cloud-product_registry/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-product_registry/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-product_registry/.toys.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/.yardopts create mode 100644 owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-product_registry/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-product_registry/Gemfile create mode 100644 owl-bot-staging/google-cloud-product_registry/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-product_registry/README.md create mode 100644 owl-bot-staging/google-cloud-product_registry/Rakefile create mode 100644 owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec create mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb create mode 100644 owl-bot-staging/google-cloud-product_registry/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-profiler/.gitignore create mode 100644 owl-bot-staging/google-cloud-profiler/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-profiler/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-profiler/.toys.rb create mode 100644 owl-bot-staging/google-cloud-profiler/.yardopts create mode 100644 owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-profiler/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-profiler/Gemfile create mode 100644 owl-bot-staging/google-cloud-profiler/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-profiler/README.md create mode 100644 owl-bot-staging/google-cloud-profiler/Rakefile create mode 100644 owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec create mode 100644 owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb create mode 100644 owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb create mode 100644 owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb create mode 100644 owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb create mode 100644 owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb create mode 100644 owl-bot-staging/google-cloud-profiler/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/README.md create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/Rakefile create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb create mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/README.md create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/Rakefile create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb create mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.gitignore create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.toys.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.yardopts create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/Gemfile create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/README.md create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/Rakefile create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb create mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-recommender/.gitignore create mode 100644 owl-bot-staging/google-cloud-recommender/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-recommender/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-recommender/.toys.rb create mode 100644 owl-bot-staging/google-cloud-recommender/.yardopts create mode 100644 owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-recommender/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-recommender/Gemfile create mode 100644 owl-bot-staging/google-cloud-recommender/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-recommender/README.md create mode 100644 owl-bot-staging/google-cloud-recommender/Rakefile create mode 100644 owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec create mode 100644 owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb create mode 100644 owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb create mode 100644 owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb create mode 100644 owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb create mode 100644 owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb create mode 100644 owl-bot-staging/google-cloud-recommender/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/.gitignore create mode 100644 owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-redis-cluster/.toys.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/.yardopts create mode 100644 owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-redis-cluster/Gemfile create mode 100644 owl-bot-staging/google-cloud-redis-cluster/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-redis-cluster/README.md create mode 100644 owl-bot-staging/google-cloud-redis-cluster/Rakefile create mode 100644 owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec create mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb create mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-redis/.gitignore create mode 100644 owl-bot-staging/google-cloud-redis/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-redis/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-redis/.toys.rb create mode 100644 owl-bot-staging/google-cloud-redis/.yardopts create mode 100644 owl-bot-staging/google-cloud-redis/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-redis/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-redis/Gemfile create mode 100644 owl-bot-staging/google-cloud-redis/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-redis/README.md create mode 100644 owl-bot-staging/google-cloud-redis/Rakefile create mode 100644 owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec create mode 100644 owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb create mode 100644 owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb create mode 100644 owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb create mode 100644 owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb create mode 100644 owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb create mode 100644 owl-bot-staging/google-cloud-redis/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/.gitignore create mode 100644 owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-resource_manager/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-resource_manager/.toys.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/.yardopts create mode 100644 owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-resource_manager/Gemfile create mode 100644 owl-bot-staging/google-cloud-resource_manager/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-resource_manager/README.md create mode 100644 owl-bot-staging/google-cloud-resource_manager/Rakefile create mode 100644 owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec create mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb create mode 100644 owl-bot-staging/google-cloud-resource_manager/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-retail/.gitignore create mode 100644 owl-bot-staging/google-cloud-retail/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-retail/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-retail/.toys.rb create mode 100644 owl-bot-staging/google-cloud-retail/.yardopts create mode 100644 owl-bot-staging/google-cloud-retail/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-retail/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-retail/Gemfile create mode 100644 owl-bot-staging/google-cloud-retail/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-retail/README.md create mode 100644 owl-bot-staging/google-cloud-retail/Rakefile create mode 100644 owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec create mode 100644 owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb create mode 100644 owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb create mode 100644 owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb create mode 100644 owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb create mode 100644 owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb create mode 100644 owl-bot-staging/google-cloud-retail/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-run-client/.gitignore create mode 100644 owl-bot-staging/google-cloud-run-client/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-run-client/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-run-client/.toys.rb create mode 100644 owl-bot-staging/google-cloud-run-client/.yardopts create mode 100644 owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-run-client/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-run-client/Gemfile create mode 100644 owl-bot-staging/google-cloud-run-client/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-run-client/README.md create mode 100644 owl-bot-staging/google-cloud-run-client/Rakefile create mode 100644 owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec create mode 100644 owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb create mode 100644 owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb create mode 100644 owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb create mode 100644 owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb create mode 100644 owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb create mode 100644 owl-bot-staging/google-cloud-run-client/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Rakefile create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb create mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/.gitignore create mode 100644 owl-bot-staging/google-cloud-scheduler/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-scheduler/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-scheduler/.toys.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/.yardopts create mode 100644 owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-scheduler/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-scheduler/Gemfile create mode 100644 owl-bot-staging/google-cloud-scheduler/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-scheduler/README.md create mode 100644 owl-bot-staging/google-cloud-scheduler/Rakefile create mode 100644 owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec create mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb create mode 100644 owl-bot-staging/google-cloud-scheduler/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/.gitignore create mode 100644 owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-secret_manager/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-secret_manager/.toys.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/.yardopts create mode 100644 owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-secret_manager/Gemfile create mode 100644 owl-bot-staging/google-cloud-secret_manager/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-secret_manager/README.md create mode 100644 owl-bot-staging/google-cloud-secret_manager/Rakefile create mode 100644 owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec create mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.gitignore create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.toys.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.yardopts create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/Gemfile create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/README.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/Rakefile create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/.gitignore create mode 100644 owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security-private_ca/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/.yardopts create mode 100644 owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-private_ca/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca/README.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca/Rakefile create mode 100644 owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec create mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/.gitignore create mode 100644 owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security-public_ca/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/.yardopts create mode 100644 owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security-public_ca/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-public_ca/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security-public_ca/README.md create mode 100644 owl-bot-staging/google-cloud-security-public_ca/Rakefile create mode 100644 owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec create mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb create mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center/README.md create mode 100644 owl-bot-staging/google-cloud-security_center/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center_management/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center_management/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center_management/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center_management/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center_management/README.md create mode 100644 owl-bot-staging/google-cloud-security_center_management/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_control/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_control/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_control/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_control/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_control/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_control/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_control/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_control/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_control/README.md create mode 100644 owl-bot-staging/google-cloud-service_control/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec create mode 100644 owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb create mode 100644 owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb create mode 100644 owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb create mode 100644 owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control/test/helper.rb diff --git a/owl-bot-staging/google-cloud-product_registry/.gitignore b/owl-bot-staging/google-cloud-product_registry/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json b/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json new file mode 100644 index 000000000000..67ec5a31ea90 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "cloudproductregistry.googleapis.com", + "api_shortname": "cloudproductregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry/latest", + "distribution_name": "google-cloud-product_registry", + "is_cloud": true, + "language": "ruby", + "name": "cloudproductregistry", + "name_pretty": "Cloud Product Registry API", + "product_documentation": "https://docs.cloud.google.com/product-registry", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "cloudproductregistry.googleapis.com API.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/product-registry", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-product_registry/.rubocop.yml b/owl-bot-staging/google-cloud-product_registry/.rubocop.yml new file mode 100644 index 000000000000..33d3adbe6e3b --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-product_registry.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-product_registry.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-product_registry/.toys.rb b/owl-bot-staging/google-cloud-product_registry/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-product_registry/.yardopts b/owl-bot-staging/google-cloud-product_registry/.yardopts new file mode 100644 index 000000000000..e998d2aef9a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Product Registry API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md b/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md new file mode 100644 index 000000000000..f86e2450cb90 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-product_registry library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-product_registry library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/product_registry" + +client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/product_registry" + +Google::Cloud::ProductRegistry.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-product_registry +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/product_registry" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md b/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-product_registry/Gemfile b/owl-bot-staging/google-cloud-product_registry/Gemfile new file mode 100644 index 000000000000..cfdc76941470 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-product_registry-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-product_registry.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-product_registry/LICENSE.md b/owl-bot-staging/google-cloud-product_registry/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-product_registry/README.md b/owl-bot-staging/google-cloud-product_registry/README.md new file mode 100644 index 000000000000..e1d218dc0050 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/README.md @@ -0,0 +1,141 @@ +# Ruby Client for the Cloud Product Registry API + +cloudproductregistry.googleapis.com API. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-product_registry-v*`. +The gem `google-cloud-product_registry` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry/latest) +for this library, google-cloud-product_registry, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-product_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest). + +See also the [Product Documentation](https://docs.cloud.google.com/product-registry) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-product_registry +``` + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudproductregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/product_registry" + +client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service +request = ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new # (request fields as keyword arguments...) +response = client.get_product_suite request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-product_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-product_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-product_registry-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-product_registry`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-product_registry-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-product_registry/Rakefile b/owl-bot-staging/google-cloud-product_registry/Rakefile new file mode 100644 index 000000000000..b0448be0df00 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/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 = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-product_registry acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" + ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-product_registry gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-product_registry gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-product_registry gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-product_registry gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-product_registry" + header "google-cloud-product_registry rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-product_registry yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-product_registry test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-product_registry smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-product_registry acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec b/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec new file mode 100644 index 000000000000..bc0341efb847 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/product_registry/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-product_registry" + gem.version = Google::Cloud::ProductRegistry::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "cloudproductregistry.googleapis.com API." + gem.summary = "cloudproductregistry.googleapis.com API." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-product_registry-v1", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb b/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb new file mode 100644 index 000000000000..5de7d186c0d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/product_registry" unless defined? Google::Cloud::ProductRegistry::VERSION diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb new file mode 100644 index 000000000000..e66b84b078a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/product_registry/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :product_registry do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module ProductRegistry + ## + # Create a new client object for CloudProductRegistryReadService. + # + # By default, this returns an instance of + # [Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest/Google-Cloud-ProductRegistry-V1-CloudProductRegistryReadService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CloudProductRegistryReadService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CloudProductRegistryReadService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available?}. + # + # ## About CloudProductRegistryReadService + # + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cloud_product_registry_read_service version: :v1, transport: :grpc, &block + require "google/cloud/product_registry/#{version.to_s.downcase}" + + package_name = Google::Cloud::ProductRegistry + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ProductRegistry.const_get(package_name).const_get(:CloudProductRegistryReadService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CloudProductRegistryReadService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ProductRegistry.cloud_product_registry_read_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CloudProductRegistryReadService service, + # or if the versioned client gem needs an update to support the CloudProductRegistryReadService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cloud_product_registry_read_service_available? version: :v1, transport: :grpc + require "google/cloud/product_registry/#{version.to_s.downcase}" + package_name = Google::Cloud::ProductRegistry + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ProductRegistry.const_get package_name + return false unless service_module.const_defined? :CloudProductRegistryReadService + service_module = service_module.const_get :CloudProductRegistryReadService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-product_registry library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.product_registry if block_given? + + ::Google::Cloud.configure.product_registry + end + end + end +end + +helper_path = ::File.join __dir__, "product_registry", "helpers.rb" +require "google/cloud/product_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb new file mode 100644 index 000000000000..60406859ba95 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.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! + + +module Google + module Cloud + module ProductRegistry + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb new file mode 100644 index 000000000000..735cda723404 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/product_registry" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::ProductRegistry::ClientConstructionMinitest < 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_cloud_product_registry_read_service_grpc + skip unless Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client, client + end + end + + def test_cloud_product_registry_read_service_rest + skip unless Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb new file mode 100644 index 000000000000..8f462c5a313b --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.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 "helper" +require "google/cloud/product_registry/version" + +class Google::Cloud::ProductRegistry::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::ProductRegistry::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-product_registry/test/helper.rb b/owl-bot-staging/google-cloud-product_registry/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-profiler/.gitignore b/owl-bot-staging/google-cloud-profiler/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-profiler/.repo-metadata.json b/owl-bot-staging/google-cloud-profiler/.repo-metadata.json new file mode 100644 index 000000000000..2ea671bbe7dc --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudprofiler.googleapis.com", + "api_shortname": "cloudprofiler", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-profiler/latest", + "distribution_name": "google-cloud-profiler", + "is_cloud": true, + "language": "ruby", + "name": "cloudprofiler", + "name_pretty": "Cloud Profiler API", + "product_documentation": "https://cloud.google.com/profiler/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code.", + "ruby-cloud-env-prefix": "PROFILER", + "ruby-cloud-product-url": "https://cloud.google.com/profiler/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-profiler/.rubocop.yml b/owl-bot-staging/google-cloud-profiler/.rubocop.yml new file mode 100644 index 000000000000..12806b0627ab --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-profiler.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-profiler.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-profiler/.toys.rb b/owl-bot-staging/google-cloud-profiler/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/.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-profiler/.yardopts b/owl-bot-staging/google-cloud-profiler/.yardopts new file mode 100644 index 000000000000..e4b95f189bd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Profiler API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md b/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md new file mode 100644 index 000000000000..59121f2318c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-profiler 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-profiler 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/profiler" + +client = Google::Cloud::Profiler.profiler_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/profiler" + +Google::Cloud::Profiler.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Profiler.profiler_service +``` + +### 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-profiler +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/profiler" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Profiler.profiler_service +``` + +### 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-profiler/CHANGELOG.md b/owl-bot-staging/google-cloud-profiler/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-profiler/Gemfile b/owl-bot-staging/google-cloud-profiler/Gemfile new file mode 100644 index 000000000000..e9c272fd6ddd --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-profiler-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-profiler.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-profiler/LICENSE.md b/owl-bot-staging/google-cloud-profiler/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/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-profiler/README.md b/owl-bot-staging/google-cloud-profiler/README.md new file mode 100644 index 000000000000..9a673a4d2ee8 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Cloud Profiler API + +API Client library for the Cloud Profiler API + +Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-profiler-v*`. +The gem `google-cloud-profiler` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler/latest) +for this library, google-cloud-profiler, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-profiler-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest). + +See also the [Product Documentation](https://cloud.google.com/profiler/docs) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-profiler +``` + +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/cloudprofiler.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/profiler" + +client = Google::Cloud::Profiler.profiler_service +request = ::Google::Cloud::Profiler::V2::CreateProfileRequest.new # (request fields as keyword arguments...) +response = client.create_profile request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-profiler-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-profiler`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-profiler-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-profiler`. +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-profiler-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-profiler/Rakefile b/owl-bot-staging/google-cloud-profiler/Rakefile new file mode 100644 index 000000000000..d5348d15ab40 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/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 = true +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-profiler acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["PROFILER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["PROFILER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["PROFILER_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 PROFILER_TEST_PROJECT=test123 PROFILER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/profiler/v2/profiler_service/credentials" + ::Google::Cloud::Profiler::V2::ProfilerService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["PROFILER_PROJECT"] = project + ENV["PROFILER_TEST_PROJECT"] = project + ENV["PROFILER_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-profiler 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-profiler 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-profiler 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-profiler gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-profiler" + header "google-cloud-profiler rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-profiler yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-profiler 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-profiler 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-profiler 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-profiler/google-cloud-profiler.gemspec b/owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec new file mode 100644 index 000000000000..1aa964ba91ff --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/profiler/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-profiler" + gem.version = Google::Cloud::Profiler::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code." + gem.summary = "API Client library for the Cloud Profiler 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-profiler-v2", ">= 0.9", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb b/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb new file mode 100644 index 000000000000..2aeff728ee34 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/profiler" unless defined? Google::Cloud::Profiler::VERSION diff --git a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb new file mode 100644 index 000000000000..d38b8ce87a80 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/profiler/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :profiler do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Profiler + ## + # Create a new client object for ProfilerService. + # + # By default, this returns an instance of + # [Google::Cloud::Profiler::V2::ProfilerService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ProfilerService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProfilerService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ProfilerService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Profiler.profiler_service_available?}. + # + # ## About ProfilerService + # + # Manage the collection of continuous profiling data provided by profiling + # agents running in the cloud or by an offline provider of profiling data. + # + # __The APIs listed in this service are intended for use within our profiler + # agents only.__ + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.profiler_service version: :v2, transport: :grpc, &block + require "google/cloud/profiler/#{version.to_s.downcase}" + + package_name = Google::Cloud::Profiler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Profiler.const_get(package_name).const_get(:ProfilerService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ProfilerService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Profiler.profiler_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ProfilerService service, + # or if the versioned client gem needs an update to support the ProfilerService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.profiler_service_available? version: :v2, transport: :grpc + require "google/cloud/profiler/#{version.to_s.downcase}" + package_name = Google::Cloud::Profiler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Profiler.const_get package_name + return false unless service_module.const_defined? :ProfilerService + service_module = service_module.const_get :ProfilerService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ExportService. + # + # By default, this returns an instance of + # [Google::Cloud::Profiler::V2::ExportService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ExportService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ExportService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Profiler.export_service_available?}. + # + # ## About ExportService + # + # Service allows existing Cloud Profiler customers to export their profile data + # out of Google Cloud. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.export_service version: :v2, transport: :grpc, &block + require "google/cloud/profiler/#{version.to_s.downcase}" + + package_name = Google::Cloud::Profiler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Profiler.const_get(package_name).const_get(:ExportService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ExportService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Profiler.export_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ExportService service, + # or if the versioned client gem needs an update to support the ExportService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.export_service_available? version: :v2, transport: :grpc + require "google/cloud/profiler/#{version.to_s.downcase}" + package_name = Google::Cloud::Profiler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Profiler.const_get package_name + return false unless service_module.const_defined? :ExportService + service_module = service_module.const_get :ExportService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-profiler library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.profiler if block_given? + + ::Google::Cloud.configure.profiler + end + end + end +end + +helper_path = ::File.join __dir__, "profiler", "helpers.rb" +require "google/cloud/profiler/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb new file mode 100644 index 000000000000..ae845b29de7a --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.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! + + +module Google + module Cloud + module Profiler + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb new file mode 100644 index 000000000000..e3a0d1dcc342 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.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! + +require "helper" +require "google/cloud/profiler" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Profiler::ClientConstructionMinitest < 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_profiler_service_grpc + skip unless Google::Cloud::Profiler.profiler_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Profiler.profiler_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Profiler::V2::ProfilerService::Client, client + end + end + + def test_profiler_service_rest + skip unless Google::Cloud::Profiler.profiler_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Profiler.profiler_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Profiler::V2::ProfilerService::Rest::Client, client + end + end + + def test_export_service_grpc + skip unless Google::Cloud::Profiler.export_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Profiler.export_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Profiler::V2::ExportService::Client, client + end + end + + def test_export_service_rest + skip unless Google::Cloud::Profiler.export_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Profiler.export_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Profiler::V2::ExportService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb new file mode 100644 index 000000000000..19e7626008b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.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 "helper" +require "google/cloud/profiler/version" + +class Google::Cloud::Profiler::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Profiler::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-profiler/test/helper.rb b/owl-bot-staging/google-cloud-profiler/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-profiler/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore b/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json b/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json new file mode 100644 index 000000000000..b1587db22543 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "rapidmigrationassessment.googleapis.com", + "api_shortname": "rapidmigrationassessment", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment/latest", + "distribution_name": "google-cloud-rapid_migration_assessment", + "is_cloud": true, + "language": "ruby", + "name": "rapidmigrationassessment", + "name_pretty": "Rapid Migration Assessment API", + "product_documentation": "https://cloud.google.com/migration-center/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Rapid Migration Assessment service is our first-party migration assessment and planning tool.", + "ruby-cloud-product-url": "https://cloud.google.com/migration-center/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml b/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml new file mode 100644 index 000000000000..d4a47aeea4fa --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-rapid_migration_assessment.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-rapid_migration_assessment.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/.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-rapid_migration_assessment/.yardopts b/owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts new file mode 100644 index 000000000000..1fcbd04b5c20 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Rapid Migration Assessment API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md new file mode 100644 index 000000000000..90c88f61aadb --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-rapid_migration_assessment 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-rapid_migration_assessment 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/rapid_migration_assessment" + +client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/rapid_migration_assessment" + +Google::Cloud::RapidMigrationAssessment.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment +``` + +### 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-rapid_migration_assessment +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/rapid_migration_assessment" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment +``` + +### 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-rapid_migration_assessment/CHANGELOG.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile b/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile new file mode 100644 index 000000000000..2c9d94368a6e --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-rapid_migration_assessment-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-rapid_migration_assessment.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/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-rapid_migration_assessment/README.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/README.md new file mode 100644 index 000000000000..1b8f804a8609 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Rapid Migration Assessment API + +The Rapid Migration Assessment service is our first-party migration assessment and planning tool. + +The Rapid Migration Assessment service is our first-party migration assessment and planning tool. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-rapid_migration_assessment-v*`. +The gem `google-cloud-rapid_migration_assessment` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment/latest) +for this library, google-cloud-rapid_migration_assessment, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-rapid_migration_assessment-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/migration-center/docs) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-rapid_migration_assessment +``` + +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/rapidmigrationassessment.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/rapid_migration_assessment" + +client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment +request = ::Google::Cloud::RapidMigrationAssessment::V1::CreateCollectorRequest.new # (request fields as keyword arguments...) +response = client.create_collector request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-rapid_migration_assessment-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-rapid_migration_assessment`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-rapid_migration_assessment-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-rapid_migration_assessment`. +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-rapid_migration_assessment-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-rapid_migration_assessment/Rakefile b/owl-bot-staging/google-cloud-rapid_migration_assessment/Rakefile new file mode 100644 index 000000000000..a4f6110ae221 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/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 = true +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-rapid_migration_assessment 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/rapid_migration_assessment/v1/rapid_migration_assessment/credentials" + ::Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-rapid_migration_assessment" + header "google-cloud-rapid_migration_assessment rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-rapid_migration_assessment yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec b/owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec new file mode 100644 index 000000000000..735d3f3a6094 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/rapid_migration_assessment/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-rapid_migration_assessment" + gem.version = Google::Cloud::RapidMigrationAssessment::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Rapid Migration Assessment service is our first-party migration assessment and planning tool." + gem.summary = "The Rapid Migration Assessment service is our first-party migration assessment and planning tool." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-rapid_migration_assessment-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb new file mode 100644 index 000000000000..e24e54ee8658 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/rapid_migration_assessment" unless defined? Google::Cloud::RapidMigrationAssessment::VERSION diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb new file mode 100644 index 000000000000..3497a0fa20f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/rapid_migration_assessment/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :rapid_migration_assessment do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module RapidMigrationAssessment + ## + # Create a new client object for RapidMigrationAssessment. + # + # By default, this returns an instance of + # [Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest/Google-Cloud-RapidMigrationAssessment-V1-RapidMigrationAssessment-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the RapidMigrationAssessment service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the RapidMigrationAssessment service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available?}. + # + # ## About RapidMigrationAssessment + # + # Service describing handlers for resources. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.rapid_migration_assessment version: :v1, transport: :grpc, &block + require "google/cloud/rapid_migration_assessment/#{version.to_s.downcase}" + + package_name = Google::Cloud::RapidMigrationAssessment + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RapidMigrationAssessment.const_get(package_name).const_get(:RapidMigrationAssessment) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the RapidMigrationAssessment service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the RapidMigrationAssessment service, + # or if the versioned client gem needs an update to support the RapidMigrationAssessment service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.rapid_migration_assessment_available? version: :v1, transport: :grpc + require "google/cloud/rapid_migration_assessment/#{version.to_s.downcase}" + package_name = Google::Cloud::RapidMigrationAssessment + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RapidMigrationAssessment.const_get package_name + return false unless service_module.const_defined? :RapidMigrationAssessment + service_module = service_module.const_get :RapidMigrationAssessment + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-rapid_migration_assessment library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.rapid_migration_assessment if block_given? + + ::Google::Cloud.configure.rapid_migration_assessment + end + end + end +end + +helper_path = ::File.join __dir__, "rapid_migration_assessment", "helpers.rb" +require "google/cloud/rapid_migration_assessment/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb new file mode 100644 index 000000000000..8be3c821a1fd --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.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! + + +module Google + module Cloud + module RapidMigrationAssessment + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb new file mode 100644 index 000000000000..705fb490d739 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/rapid_migration_assessment" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::RapidMigrationAssessment::ClientConstructionMinitest < 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_rapid_migration_assessment_grpc + skip unless Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Client, client + end + end + + def test_rapid_migration_assessment_rest + skip unless Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb new file mode 100644 index 000000000000..61766b818718 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.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 "helper" +require "google/cloud/rapid_migration_assessment/version" + +class Google::Cloud::RapidMigrationAssessment::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::RapidMigrationAssessment::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore b/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json new file mode 100644 index 000000000000..35ab06056f92 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "recaptchaenterprise.googleapis.com", + "api_shortname": "recaptchaenterprise", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise/latest", + "distribution_name": "google-cloud-recaptcha_enterprise", + "is_cloud": true, + "language": "ruby", + "name": "recaptchaenterprise", + "name_pretty": "reCAPTCHA Enterprise API", + "product_documentation": "https://cloud.google.com/recaptcha-enterprise", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "reCAPTCHA Enterprise is a service that protects your site from spam and abuse.", + "ruby-cloud-env-prefix": "RECAPTCHA_ENTERPRISE", + "ruby-cloud-product-url": "https://cloud.google.com/recaptcha-enterprise", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml b/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml new file mode 100644 index 000000000000..fcb7a91bebac --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-recaptcha_enterprise.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-recaptcha_enterprise.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/.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-recaptcha_enterprise/.yardopts b/owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts new file mode 100644 index 000000000000..3e6ecd16105e --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="reCAPTCHA Enterprise API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md new file mode 100644 index 000000000000..40c7c6576a97 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-recaptcha_enterprise 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-recaptcha_enterprise 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/recaptcha_enterprise" + +client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/recaptcha_enterprise" + +Google::Cloud::RecaptchaEnterprise.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service +``` + +### 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-recaptcha_enterprise +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/recaptcha_enterprise" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service +``` + +### 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-recaptcha_enterprise/CHANGELOG.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile new file mode 100644 index 000000000000..d08328f1bac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-recaptcha_enterprise-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recaptcha_enterprise.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/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-recaptcha_enterprise/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/README.md new file mode 100644 index 000000000000..32e3552def3b --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the reCAPTCHA Enterprise API + +API Client library for the reCAPTCHA Enterprise API + +reCAPTCHA Enterprise is a service that protects your site from spam and abuse. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-recaptcha_enterprise-v*`. +The gem `google-cloud-recaptcha_enterprise` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise/latest) +for this library, google-cloud-recaptcha_enterprise, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-recaptcha_enterprise +``` + +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/recaptchaenterprise.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/recaptcha_enterprise" + +client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service +request = ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new # (request fields as keyword arguments...) +response = client.create_assessment request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-recaptcha_enterprise`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-recaptcha_enterprise-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-recaptcha_enterprise`. +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-recaptcha_enterprise-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-recaptcha_enterprise/Rakefile b/owl-bot-staging/google-cloud-recaptcha_enterprise/Rakefile new file mode 100644 index 000000000000..8801ccc811f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/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 = true +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-recaptcha_enterprise acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["RECAPTCHA_ENTERPRISE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["RECAPTCHA_ENTERPRISE_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 RECAPTCHA_ENTERPRISE_TEST_PROJECT=test123 RECAPTCHA_ENTERPRISE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" + ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["RECAPTCHA_ENTERPRISE_PROJECT"] = project + ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] = project + ENV["RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-recaptcha_enterprise" + header "google-cloud-recaptcha_enterprise rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-recaptcha_enterprise yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec b/owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec new file mode 100644 index 000000000000..52b89ec93be3 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/recaptcha_enterprise/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-recaptcha_enterprise" + gem.version = Google::Cloud::RecaptchaEnterprise::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "reCAPTCHA Enterprise is a service that protects your site from spam and abuse." + gem.summary = "API Client library for the reCAPTCHA Enterprise 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-recaptcha_enterprise-v1", "~> 1.6" +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb new file mode 100644 index 000000000000..7a2eb0be3ece --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/recaptcha_enterprise" unless defined? Google::Cloud::RecaptchaEnterprise::VERSION diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb new file mode 100644 index 000000000000..feac7c465136 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/recaptcha_enterprise/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :recaptcha_enterprise do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module RecaptchaEnterprise + ## + # Create a new client object for RecaptchaEnterpriseService. + # + # By default, this returns an instance of + # [Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the RecaptchaEnterpriseService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the RecaptchaEnterpriseService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service_available?}. + # + # ## About RecaptchaEnterpriseService + # + # Service to determine the likelihood an event is legitimate. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.recaptcha_enterprise_service version: :v1, &block + require "google/cloud/recaptcha_enterprise/#{version.to_s.downcase}" + + package_name = Google::Cloud::RecaptchaEnterprise + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RecaptchaEnterprise.const_get(package_name).const_get(:RecaptchaEnterpriseService) + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the RecaptchaEnterpriseService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the RecaptchaEnterpriseService service, + # or if the versioned client gem needs an update to support the RecaptchaEnterpriseService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.recaptcha_enterprise_service_available? version: :v1 + require "google/cloud/recaptcha_enterprise/#{version.to_s.downcase}" + package_name = Google::Cloud::RecaptchaEnterprise + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RecaptchaEnterprise.const_get package_name + return false unless service_module.const_defined? :RecaptchaEnterpriseService + service_module = service_module.const_get :RecaptchaEnterpriseService + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-recaptcha_enterprise library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.recaptcha_enterprise if block_given? + + ::Google::Cloud.configure.recaptcha_enterprise + end + end + end +end + +helper_path = ::File.join __dir__, "recaptcha_enterprise", "helpers.rb" +require "google/cloud/recaptcha_enterprise/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb new file mode 100644 index 000000000000..874783301b52 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.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! + + +module Google + module Cloud + module RecaptchaEnterprise + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb new file mode 100644 index 000000000000..8875f83e7aff --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.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 "helper" +require "google/cloud/recaptcha_enterprise" +require "gapic/common" +require "gapic/grpc" + +class Google::Cloud::RecaptchaEnterprise::ClientConstructionMinitest < 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_recaptcha_enterprise_service_grpc + skip unless Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service_available? + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb new file mode 100644 index 000000000000..cfc6497f1d9b --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.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 "helper" +require "google/cloud/recaptcha_enterprise/version" + +class Google::Cloud::RecaptchaEnterprise::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::RecaptchaEnterprise::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.gitignore b/owl-bot-staging/google-cloud-recommendation_engine/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json b/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json new file mode 100644 index 000000000000..b39e1c10e46c --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "recommendationengine.googleapis.com", + "api_shortname": "recommendationengine", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine/latest", + "distribution_name": "google-cloud-recommendation_engine", + "is_cloud": true, + "language": "ruby", + "name": "recommendationengine", + "name_pretty": "Recommendations AI API", + "product_documentation": "https://cloud.google.com/recommendations", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems.", + "ruby-cloud-env-prefix": "RECOMMENDATION_ENGINE", + "ruby-cloud-product-url": "https://cloud.google.com/recommendations", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml b/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml new file mode 100644 index 000000000000..c4f711187121 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-recommendation_engine.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-recommendation_engine.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.toys.rb b/owl-bot-staging/google-cloud-recommendation_engine/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/.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-recommendation_engine/.yardopts b/owl-bot-staging/google-cloud-recommendation_engine/.yardopts new file mode 100644 index 000000000000..31cc53ded05b --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Recommendations AI API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md new file mode 100644 index 000000000000..c225dd7f867a --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-recommendation_engine 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-recommendation_engine 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/recommendation_engine" + +client = Google::Cloud::RecommendationEngine.catalog_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/recommendation_engine" + +Google::Cloud::RecommendationEngine.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::RecommendationEngine.catalog_service +``` + +### 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-recommendation_engine +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/recommendation_engine" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::RecommendationEngine.catalog_service +``` + +### 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-recommendation_engine/CHANGELOG.md b/owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-recommendation_engine/Gemfile b/owl-bot-staging/google-cloud-recommendation_engine/Gemfile new file mode 100644 index 000000000000..977763624f4a --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-recommendation_engine-v1beta1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recommendation_engine.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md b/owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/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-recommendation_engine/README.md b/owl-bot-staging/google-cloud-recommendation_engine/README.md new file mode 100644 index 000000000000..2f635550baa4 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Recommendations AI API + +API Client library for the Recommendations AI API + +Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-recommendation_engine-v*`. +The gem `google-cloud-recommendation_engine` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine/latest) +for this library, google-cloud-recommendation_engine, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-recommendation_engine-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest). + +See also the [Product Documentation](https://cloud.google.com/recommendations) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-recommendation_engine +``` + +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/recommendationengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/recommendation_engine" + +client = Google::Cloud::RecommendationEngine.catalog_service +request = ::Google::Cloud::RecommendationEngine::V1beta1::CreateCatalogItemRequest.new # (request fields as keyword arguments...) +response = client.create_catalog_item request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-recommendation_engine-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-recommendation_engine`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-recommendation_engine-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-recommendation_engine`. +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-recommendation_engine-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-recommendation_engine/Rakefile b/owl-bot-staging/google-cloud-recommendation_engine/Rakefile new file mode 100644 index 000000000000..3a827aff4b13 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/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 = true +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-recommendation_engine acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["RECOMMENDATION_ENGINE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["RECOMMENDATION_ENGINE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["RECOMMENDATION_ENGINE_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 RECOMMENDATION_ENGINE_TEST_PROJECT=test123 RECOMMENDATION_ENGINE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/recommendation_engine/v1beta1/catalog_service/credentials" + ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["RECOMMENDATION_ENGINE_PROJECT"] = project + ENV["RECOMMENDATION_ENGINE_TEST_PROJECT"] = project + ENV["RECOMMENDATION_ENGINE_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-recommendation_engine 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-recommendation_engine 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-recommendation_engine 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-recommendation_engine gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-recommendation_engine" + header "google-cloud-recommendation_engine rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-recommendation_engine yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-recommendation_engine 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-recommendation_engine 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-recommendation_engine 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-recommendation_engine/google-cloud-recommendation_engine.gemspec b/owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec new file mode 100644 index 000000000000..48a314b398b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/recommendation_engine/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-recommendation_engine" + gem.version = Google::Cloud::RecommendationEngine::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems." + gem.summary = "API Client library for the Recommendations AI 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-recommendation_engine-v1beta1", ">= 0.8", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb new file mode 100644 index 000000000000..afc81d0994a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/recommendation_engine" unless defined? Google::Cloud::RecommendationEngine::VERSION diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb new file mode 100644 index 000000000000..bf98c7f7d3aa --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb @@ -0,0 +1,371 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/recommendation_engine/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :recommendation_engine do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module RecommendationEngine + ## + # Create a new client object for CatalogService. + # + # By default, this returns an instance of + # [Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-CatalogService-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CatalogService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CatalogService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RecommendationEngine.catalog_service_available?}. + # + # ## About CatalogService + # + # Service for ingesting catalog information of the customer's website. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.catalog_service version: :v1beta1, transport: :grpc, &block + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:CatalogService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CatalogService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.catalog_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CatalogService service, + # or if the versioned client gem needs an update to support the CatalogService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.catalog_service_available? version: :v1beta1, transport: :grpc + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RecommendationEngine.const_get package_name + return false unless service_module.const_defined? :CatalogService + service_module = service_module.const_get :CatalogService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for PredictionApiKeyRegistry. + # + # By default, this returns an instance of + # [Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-PredictionApiKeyRegistry-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PredictionApiKeyRegistry service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the PredictionApiKeyRegistry service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RecommendationEngine.prediction_api_key_registry_available?}. + # + # ## About PredictionApiKeyRegistry + # + # Service for registering API keys for use with the `predict` method. If you + # use an API key to request predictions, you must first register the API key. + # Otherwise, your prediction request is rejected. If you use OAuth to + # authenticate your `predict` method call, you do not need to register an API + # key. You can register up to 20 API keys per project. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.prediction_api_key_registry version: :v1beta1, transport: :grpc, &block + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:PredictionApiKeyRegistry) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the PredictionApiKeyRegistry service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.prediction_api_key_registry}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PredictionApiKeyRegistry service, + # or if the versioned client gem needs an update to support the PredictionApiKeyRegistry service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.prediction_api_key_registry_available? version: :v1beta1, transport: :grpc + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RecommendationEngine.const_get package_name + return false unless service_module.const_defined? :PredictionApiKeyRegistry + service_module = service_module.const_get :PredictionApiKeyRegistry + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for PredictionService. + # + # By default, this returns an instance of + # [Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-PredictionService-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PredictionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the PredictionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RecommendationEngine.prediction_service_available?}. + # + # ## About PredictionService + # + # Service for making recommendation prediction. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.prediction_service version: :v1beta1, transport: :grpc, &block + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:PredictionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the PredictionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.prediction_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PredictionService service, + # or if the versioned client gem needs an update to support the PredictionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.prediction_service_available? version: :v1beta1, transport: :grpc + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RecommendationEngine.const_get package_name + return false unless service_module.const_defined? :PredictionService + service_module = service_module.const_get :PredictionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for UserEventService. + # + # By default, this returns an instance of + # [Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-UserEventService-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the UserEventService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the UserEventService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::RecommendationEngine.user_event_service_available?}. + # + # ## About UserEventService + # + # Service for ingesting end user actions on the customer website. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.user_event_service version: :v1beta1, transport: :grpc, &block + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:UserEventService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the UserEventService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.user_event_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the UserEventService service, + # or if the versioned client gem needs an update to support the UserEventService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.user_event_service_available? version: :v1beta1, transport: :grpc + require "google/cloud/recommendation_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::RecommendationEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::RecommendationEngine.const_get package_name + return false unless service_module.const_defined? :UserEventService + service_module = service_module.const_get :UserEventService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-recommendation_engine library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.recommendation_engine if block_given? + + ::Google::Cloud.configure.recommendation_engine + end + end + end +end + +helper_path = ::File.join __dir__, "recommendation_engine", "helpers.rb" +require "google/cloud/recommendation_engine/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb new file mode 100644 index 000000000000..ab6d2e72fa21 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.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! + + +module Google + module Cloud + module RecommendationEngine + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb new file mode 100644 index 000000000000..f582f7064a11 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.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! + +require "helper" +require "google/cloud/recommendation_engine" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::RecommendationEngine::ClientConstructionMinitest < 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_catalog_service_grpc + skip unless Google::Cloud::RecommendationEngine.catalog_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RecommendationEngine.catalog_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client, client + end + end + + def test_catalog_service_rest + skip unless Google::Cloud::RecommendationEngine.catalog_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::RecommendationEngine.catalog_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client, client + end + end + + def test_prediction_api_key_registry_grpc + skip unless Google::Cloud::RecommendationEngine.prediction_api_key_registry_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RecommendationEngine.prediction_api_key_registry transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Client, client + end + end + + def test_prediction_api_key_registry_rest + skip unless Google::Cloud::RecommendationEngine.prediction_api_key_registry_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::RecommendationEngine.prediction_api_key_registry transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::Client, client + end + end + + def test_prediction_service_grpc + skip unless Google::Cloud::RecommendationEngine.prediction_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RecommendationEngine.prediction_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client, client + end + end + + def test_prediction_service_rest + skip unless Google::Cloud::RecommendationEngine.prediction_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::RecommendationEngine.prediction_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Rest::Client, client + end + end + + def test_user_event_service_grpc + skip unless Google::Cloud::RecommendationEngine.user_event_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::RecommendationEngine.user_event_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client, client + end + end + + def test_user_event_service_rest + skip unless Google::Cloud::RecommendationEngine.user_event_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::RecommendationEngine.user_event_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb new file mode 100644 index 000000000000..fd4e833d1a0e --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.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 "helper" +require "google/cloud/recommendation_engine/version" + +class Google::Cloud::RecommendationEngine::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::RecommendationEngine::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-recommender/.gitignore b/owl-bot-staging/google-cloud-recommender/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-recommender/.repo-metadata.json b/owl-bot-staging/google-cloud-recommender/.repo-metadata.json new file mode 100644 index 000000000000..9069bad13eac --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "recommender.googleapis.com", + "api_shortname": "recommender", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recommender/latest", + "distribution_name": "google-cloud-recommender", + "is_cloud": true, + "language": "ruby", + "name": "recommender", + "name_pretty": "Recommender API", + "product_documentation": "https://cloud.google.com/recommender", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services.", + "ruby-cloud-env-prefix": "RECOMMENDER", + "ruby-cloud-product-url": "https://cloud.google.com/recommender", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-recommender/.rubocop.yml b/owl-bot-staging/google-cloud-recommender/.rubocop.yml new file mode 100644 index 000000000000..7215da5958f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-recommender.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-recommender.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recommender/.toys.rb b/owl-bot-staging/google-cloud-recommender/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/.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-recommender/.yardopts b/owl-bot-staging/google-cloud-recommender/.yardopts new file mode 100644 index 000000000000..06acaa595a14 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Recommender API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md new file mode 100644 index 000000000000..f4a097096b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-recommender 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-recommender 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/recommender" + +client = Google::Cloud::Recommender.recommender_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/recommender" + +Google::Cloud::Recommender.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Recommender.recommender_service +``` + +### 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-recommender +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/recommender" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Recommender.recommender_service +``` + +### 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-recommender/CHANGELOG.md b/owl-bot-staging/google-cloud-recommender/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-recommender/Gemfile b/owl-bot-staging/google-cloud-recommender/Gemfile new file mode 100644 index 000000000000..0b6d1ac9b148 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-recommender-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recommender.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recommender/LICENSE.md b/owl-bot-staging/google-cloud-recommender/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/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-recommender/README.md b/owl-bot-staging/google-cloud-recommender/README.md new file mode 100644 index 000000000000..30598549f911 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Recommender API + +API Client library for the Recommender API + +Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-recommender-v*`. +The gem `google-cloud-recommender` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender/latest) +for this library, google-cloud-recommender, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-recommender-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/recommender) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-recommender +``` + +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/recommender.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/recommender" + +client = Google::Cloud::Recommender.recommender_service +request = ::Google::Cloud::Recommender::V1::ListInsightsRequest.new # (request fields as keyword arguments...) +response = client.list_insights request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-recommender-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-recommender`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-recommender-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-recommender`. +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-recommender-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-recommender/Rakefile b/owl-bot-staging/google-cloud-recommender/Rakefile new file mode 100644 index 000000000000..c04db1ffb5eb --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/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 = true +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-recommender acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["RECOMMENDER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["RECOMMENDER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["RECOMMENDER_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 RECOMMENDER_TEST_PROJECT=test123 RECOMMENDER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/recommender/v1/recommender/credentials" + ::Google::Cloud::Recommender::V1::Recommender::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["RECOMMENDER_PROJECT"] = project + ENV["RECOMMENDER_TEST_PROJECT"] = project + ENV["RECOMMENDER_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-recommender 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-recommender 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-recommender 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-recommender gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-recommender" + header "google-cloud-recommender rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-recommender yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-recommender 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-recommender 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-recommender 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-recommender/google-cloud-recommender.gemspec b/owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec new file mode 100644 index 000000000000..a81067d3b920 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/recommender/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-recommender" + gem.version = Google::Cloud::Recommender::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services." + gem.summary = "API Client library for the Recommender 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-recommender-v1", ">= 0.17", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb b/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb new file mode 100644 index 000000000000..ac3b14c26b03 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/recommender" unless defined? Google::Cloud::Recommender::VERSION diff --git a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb new file mode 100644 index 000000000000..6588abd6e9a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/recommender/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :recommender do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Recommender + ## + # Create a new client object for Recommender. + # + # By default, this returns an instance of + # [Google::Cloud::Recommender::V1::Recommender::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommender-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Recommender service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Recommender service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Recommender.recommender_service_available?}. + # + # ## About Recommender + # + # Provides insights and recommendations for cloud customers for various + # categories like performance optimization, cost savings, reliability, feature + # discovery, etc. Insights and recommendations are generated automatically + # based on analysis of user resources, configuration and monitoring metrics. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.recommender_service version: :v1, transport: :grpc, &block + require "google/cloud/recommender/#{version.to_s.downcase}" + + package_name = Google::Cloud::Recommender + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Recommender.const_get(package_name).const_get(:Recommender) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Recommender service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Recommender.recommender_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Recommender service, + # or if the versioned client gem needs an update to support the Recommender service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.recommender_service_available? version: :v1, transport: :grpc + require "google/cloud/recommender/#{version.to_s.downcase}" + package_name = Google::Cloud::Recommender + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Recommender.const_get package_name + return false unless service_module.const_defined? :Recommender + service_module = service_module.const_get :Recommender + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-recommender library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.recommender if block_given? + + ::Google::Cloud.configure.recommender + end + end + end +end + +helper_path = ::File.join __dir__, "recommender", "helpers.rb" +require "google/cloud/recommender/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb new file mode 100644 index 000000000000..7e2bc1ccb49e --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.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! + + +module Google + module Cloud + module Recommender + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb new file mode 100644 index 000000000000..c7303bf4879a --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/recommender" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Recommender::ClientConstructionMinitest < 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_recommender_service_grpc + skip unless Google::Cloud::Recommender.recommender_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Recommender.recommender_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Recommender::V1::Recommender::Client, client + end + end + + def test_recommender_service_rest + skip unless Google::Cloud::Recommender.recommender_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Recommender.recommender_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Recommender::V1::Recommender::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb new file mode 100644 index 000000000000..c28abec8aed6 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.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 "helper" +require "google/cloud/recommender/version" + +class Google::Cloud::Recommender::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Recommender::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-recommender/test/helper.rb b/owl-bot-staging/google-cloud-recommender/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-recommender/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-redis-cluster/.gitignore b/owl-bot-staging/google-cloud-redis-cluster/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json b/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json new file mode 100644 index 000000000000..a4eacf09bd79 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "redis.googleapis.com", + "api_shortname": "redis", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster/latest", + "distribution_name": "google-cloud-redis-cluster", + "is_cloud": true, + "language": "ruby", + "name": "redis", + "name_pretty": "Google Cloud Memorystore for Redis API", + "product_documentation": "https://cloud.google.com/memorystore/docs/cluster", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Creates and manages Redis instances on the Google Cloud Platform.", + "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/cluster", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml b/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml new file mode 100644 index 000000000000..fb84f9ce2d5d --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-redis-cluster.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-redis-cluster.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-redis-cluster/.toys.rb b/owl-bot-staging/google-cloud-redis-cluster/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/.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-redis-cluster/.yardopts b/owl-bot-staging/google-cloud-redis-cluster/.yardopts new file mode 100644 index 000000000000..99a35e32f21f --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Google Cloud Memorystore for Redis API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md b/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md new file mode 100644 index 000000000000..b6045d2796c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-redis-cluster 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-redis-cluster 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/redis/cluster" + +client = Google::Cloud::Redis::Cluster.cloud_redis_cluster do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/redis/cluster" + +Google::Cloud::Redis::Cluster.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Redis::Cluster.cloud_redis_cluster +``` + +### 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-redis-cluster +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/redis/cluster" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Redis::Cluster.cloud_redis_cluster +``` + +### 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-redis-cluster/CHANGELOG.md b/owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-redis-cluster/Gemfile b/owl-bot-staging/google-cloud-redis-cluster/Gemfile new file mode 100644 index 000000000000..8358ea525575 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-redis-cluster-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-redis-cluster.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-redis-cluster/LICENSE.md b/owl-bot-staging/google-cloud-redis-cluster/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/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-redis-cluster/README.md b/owl-bot-staging/google-cloud-redis-cluster/README.md new file mode 100644 index 000000000000..18d1556da6de --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/README.md @@ -0,0 +1,141 @@ +# Ruby Client for the Google Cloud Memorystore for Redis API + +Creates and manages Redis instances on the Google Cloud Platform. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-redis-cluster-v*`. +The gem `google-cloud-redis-cluster` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster/latest) +for this library, google-cloud-redis-cluster, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-redis-cluster-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/memorystore/docs/cluster) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-redis-cluster +``` + +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/redis.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/redis/cluster" + +client = Google::Cloud::Redis::Cluster.cloud_redis_cluster +request = ::Google::Cloud::Redis::Cluster::V1::ListClustersRequest.new # (request fields as keyword arguments...) +response = client.list_clusters request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-redis-cluster-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-redis-cluster`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-redis-cluster-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-redis-cluster`. +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-redis-cluster-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-redis-cluster/Rakefile b/owl-bot-staging/google-cloud-redis-cluster/Rakefile new file mode 100644 index 000000000000..2738a728b0eb --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/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 = true +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-redis-cluster 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/redis/cluster/v1/cloud_redis_cluster/credentials" + ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::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-redis-cluster 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-redis-cluster 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-redis-cluster 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-redis-cluster gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-redis-cluster" + header "google-cloud-redis-cluster rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-redis-cluster yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-redis-cluster 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-redis-cluster 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-redis-cluster 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-redis-cluster/google-cloud-redis-cluster.gemspec b/owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec new file mode 100644 index 000000000000..1f65804ae2de --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/redis/cluster/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-redis-cluster" + gem.version = Google::Cloud::Redis::Cluster::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Creates and manages Redis instances on the Google Cloud Platform." + gem.summary = "Creates and manages Redis instances on the 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-redis-cluster-v1", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb new file mode 100644 index 000000000000..32acf287e53b --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/redis/cluster" unless defined? Google::Cloud::Redis::Cluster::VERSION diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb new file mode 100644 index 000000000000..9b8f045877fa --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/redis/cluster/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :redis_cluster do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Redis + module Cluster + ## + # Create a new client object for CloudRedisCluster. + # + # By default, this returns an instance of + # [Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest/Google-Cloud-Redis-Cluster-V1-CloudRedisCluster-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CloudRedisCluster service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CloudRedisCluster service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Redis::Cluster.cloud_redis_cluster_available?}. + # + # ## About CloudRedisCluster + # + # Configures and manages Cloud Memorystore for Redis clusters + # + # Google Cloud Memorystore for Redis Cluster + # + # The `redis.googleapis.com` service implements the Google Cloud Memorystore + # for Redis API and defines the following resource model for managing Redis + # clusters: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of Redis clusters, named: `/clusters/*` + # * As such, Redis clusters are resources of the form: + # `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` + # + # Note that location_id must be a GCP `region`; for example: + # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis` + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cloud_redis_cluster version: :v1, transport: :grpc, &block + require "google/cloud/redis/cluster/#{version.to_s.downcase}" + + package_name = Google::Cloud::Redis::Cluster + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Redis::Cluster.const_get(package_name).const_get(:CloudRedisCluster) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CloudRedisCluster service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Redis::Cluster.cloud_redis_cluster}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CloudRedisCluster service, + # or if the versioned client gem needs an update to support the CloudRedisCluster service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cloud_redis_cluster_available? version: :v1, transport: :grpc + require "google/cloud/redis/cluster/#{version.to_s.downcase}" + package_name = Google::Cloud::Redis::Cluster + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Redis::Cluster.const_get package_name + return false unless service_module.const_defined? :CloudRedisCluster + service_module = service_module.const_get :CloudRedisCluster + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-redis-cluster library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.redis_cluster if block_given? + + ::Google::Cloud.configure.redis_cluster + end + end + end + end +end + +helper_path = ::File.join __dir__, "cluster", "helpers.rb" +require "google/cloud/redis/cluster/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb new file mode 100644 index 000000000000..69afe88537e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/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 Redis + module Cluster + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb new file mode 100644 index 000000000000..ebe5ffde87a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/redis/cluster" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Redis::Cluster::ClientConstructionMinitest < 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_cloud_redis_cluster_grpc + skip unless Google::Cloud::Redis::Cluster.cloud_redis_cluster_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Redis::Cluster.cloud_redis_cluster transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client, client + end + end + + def test_cloud_redis_cluster_rest + skip unless Google::Cloud::Redis::Cluster.cloud_redis_cluster_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Redis::Cluster.cloud_redis_cluster transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb new file mode 100644 index 000000000000..f4255931d11b --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.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 "helper" +require "google/cloud/redis/cluster/version" + +class Google::Cloud::Redis::Cluster::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Redis::Cluster::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb b/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-redis/.gitignore b/owl-bot-staging/google-cloud-redis/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-redis/.repo-metadata.json b/owl-bot-staging/google-cloud-redis/.repo-metadata.json new file mode 100644 index 000000000000..dcc38b4fbac7 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "redis.googleapis.com", + "api_shortname": "redis", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-redis/latest", + "distribution_name": "google-cloud-redis", + "is_cloud": true, + "language": "ruby", + "name": "redis", + "name_pretty": "Google Cloud Memorystore for Redis API", + "product_documentation": "https://cloud.google.com/memorystore/docs/redis", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Creates and manages Redis instances on the Google Cloud Platform.", + "ruby-cloud-env-prefix": "REDIS", + "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/redis", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-redis/.rubocop.yml b/owl-bot-staging/google-cloud-redis/.rubocop.yml new file mode 100644 index 000000000000..2251f5deb43a --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-redis.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-redis.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-redis/.toys.rb b/owl-bot-staging/google-cloud-redis/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/.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-redis/.yardopts b/owl-bot-staging/google-cloud-redis/.yardopts new file mode 100644 index 000000000000..99a35e32f21f --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Google Cloud Memorystore for Redis API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md b/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md new file mode 100644 index 000000000000..ea9c72a70bac --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-redis 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-redis 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/redis" + +client = Google::Cloud::Redis.cloud_redis do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/redis" + +Google::Cloud::Redis.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Redis.cloud_redis +``` + +### 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-redis +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/redis" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Redis.cloud_redis +``` + +### 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-redis/CHANGELOG.md b/owl-bot-staging/google-cloud-redis/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-redis/Gemfile b/owl-bot-staging/google-cloud-redis/Gemfile new file mode 100644 index 000000000000..f8ca4d7fc143 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-redis-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-redis.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-redis/LICENSE.md b/owl-bot-staging/google-cloud-redis/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/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-redis/README.md b/owl-bot-staging/google-cloud-redis/README.md new file mode 100644 index 000000000000..c247a9ec0259 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Google Cloud Memorystore for Redis API + +API Client library for the Google Cloud Memorystore for Redis API + +Creates and manages Redis instances on the Google Cloud Platform. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-redis-v*`. +The gem `google-cloud-redis` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-redis/latest) +for this library, google-cloud-redis, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-redis +``` + +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/redis.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/redis" + +client = Google::Cloud::Redis.cloud_redis +request = ::Google::Cloud::Redis::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-redis`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-redis-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-redis`. +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-redis-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-redis/Rakefile b/owl-bot-staging/google-cloud-redis/Rakefile new file mode 100644 index 000000000000..fab25f21e041 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/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 = true +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-redis acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["REDIS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["REDIS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["REDIS_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 REDIS_TEST_PROJECT=test123 REDIS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/redis/v1/cloud_redis/credentials" + ::Google::Cloud::Redis::V1::CloudRedis::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["REDIS_PROJECT"] = project + ENV["REDIS_TEST_PROJECT"] = project + ENV["REDIS_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-redis 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-redis 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-redis 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-redis gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-redis" + header "google-cloud-redis rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-redis yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-redis 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-redis 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-redis 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-redis/google-cloud-redis.gemspec b/owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec new file mode 100644 index 000000000000..7cf41d0d75dd --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/redis/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-redis" + gem.version = Google::Cloud::Redis::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Creates and manages Redis instances on the Google Cloud Platform." + gem.summary = "API Client library for the Google Cloud Memorystore for Redis 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-redis-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb b/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb new file mode 100644 index 000000000000..24f7f7efe908 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/redis" unless defined? Google::Cloud::Redis::VERSION diff --git a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb new file mode 100644 index 000000000000..369b2b1354be --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/redis/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :redis do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Redis + ## + # Create a new client object for CloudRedis. + # + # By default, this returns an instance of + # [Google::Cloud::Redis::V1::CloudRedis::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest/Google-Cloud-Redis-V1-CloudRedis-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CloudRedis service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CloudRedis service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Redis.cloud_redis_available?}. + # + # ## About CloudRedis + # + # Configures and manages Cloud Memorystore for Redis instances + # + # Google Cloud Memorystore for Redis v1 + # + # The `redis.googleapis.com` service implements the Google Cloud Memorystore + # for Redis API and defines the following resource model for managing Redis + # instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of Redis instances, named: `/instances/*` + # * As such, Redis instances are resources of the form: + # `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + # + # Note that location_id must be referring to a GCP `region`; for example: + # * `projects/redpepper-1290/locations/us-central1/instances/my-redis` + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cloud_redis version: :v1, transport: :grpc, &block + require "google/cloud/redis/#{version.to_s.downcase}" + + package_name = Google::Cloud::Redis + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Redis.const_get(package_name).const_get(:CloudRedis) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CloudRedis service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Redis.cloud_redis}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CloudRedis service, + # or if the versioned client gem needs an update to support the CloudRedis service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cloud_redis_available? version: :v1, transport: :grpc + require "google/cloud/redis/#{version.to_s.downcase}" + package_name = Google::Cloud::Redis + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Redis.const_get package_name + return false unless service_module.const_defined? :CloudRedis + service_module = service_module.const_get :CloudRedis + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-redis library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.redis if block_given? + + ::Google::Cloud.configure.redis + end + end + end +end + +helper_path = ::File.join __dir__, "redis", "helpers.rb" +require "google/cloud/redis/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb new file mode 100644 index 000000000000..cd614cdb85fc --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.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! + + +module Google + module Cloud + module Redis + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb new file mode 100644 index 000000000000..73cd355f4744 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/redis" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Redis::ClientConstructionMinitest < 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_cloud_redis_grpc + skip unless Google::Cloud::Redis.cloud_redis_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Redis.cloud_redis transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Redis::V1::CloudRedis::Client, client + end + end + + def test_cloud_redis_rest + skip unless Google::Cloud::Redis.cloud_redis_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Redis.cloud_redis transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Redis::V1::CloudRedis::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb new file mode 100644 index 000000000000..d762219f9508 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.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 "helper" +require "google/cloud/redis/version" + +class Google::Cloud::Redis::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Redis::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-redis/test/helper.rb b/owl-bot-staging/google-cloud-redis/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-redis/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-resource_manager/.gitignore b/owl-bot-staging/google-cloud-resource_manager/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json new file mode 100644 index 000000000000..8a72b65aaf7b --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_id": "cloudresourcemanager.googleapis.com", + "api_shortname": "cloudresourcemanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager/latest", + "distribution_name": "google-cloud-resource_manager", + "is_cloud": true, + "language": "ruby", + "name": "cloudresourcemanager", + "name_pretty": "Cloud Resource Manager API", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml b/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml new file mode 100644 index 000000000000..38e7ef0201f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-resource_manager.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-resource_manager.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-resource_manager/.toys.rb b/owl-bot-staging/google-cloud-resource_manager/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/.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-resource_manager/.yardopts b/owl-bot-staging/google-cloud-resource_manager/.yardopts new file mode 100644 index 000000000000..f33dd0accdd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Resource Manager API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +MIGRATING.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md new file mode 100644 index 000000000000..a0127ab5179c --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-resource_manager 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-resource_manager 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/resource_manager" + +client = Google::Cloud::ResourceManager.folders do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/resource_manager" + +Google::Cloud::ResourceManager.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::ResourceManager.folders +``` + +### 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-resource_manager +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/resource_manager" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::ResourceManager.folders +``` + +### 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-resource_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-resource_manager/Gemfile b/owl-bot-staging/google-cloud-resource_manager/Gemfile new file mode 100644 index 000000000000..7b834f17cdbd --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-resource_manager-v3"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-resource_manager.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-resource_manager/LICENSE.md b/owl-bot-staging/google-cloud-resource_manager/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/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-resource_manager/README.md b/owl-bot-staging/google-cloud-resource_manager/README.md new file mode 100644 index 000000000000..5831ae2d9540 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/README.md @@ -0,0 +1,147 @@ +# Ruby Client for the Cloud Resource Manager API + +Creates, reads, and updates metadata for Google Cloud Platform resource containers. + +Creates, reads, and updates metadata for Google Cloud Platform resource containers. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-resource_manager-v*`. +The gem `google-cloud-resource_manager` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager/latest) +for this library, google-cloud-resource_manager, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-resource_manager-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest). + +## Quick Start + +``` +$ gem install google-cloud-resource_manager +``` + +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/cloudresourcemanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/resource_manager" + +client = Google::Cloud::ResourceManager.folders +request = ::Google::Cloud::ResourceManager::V3::GetFolderRequest.new # (request fields as keyword arguments...) +response = client.get_folder request +``` + +## Migrating from 0.x versions + +The 1.0 release of the google-cloud-resource_manager client is a significant upgrade +based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), +and includes substantial interface changes. Existing code written for earlier +versions of this library will likely require updates to use this version. +See the {file:MIGRATING.md MIGRATING.md} document for more 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-resource_manager-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-resource_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-resource_manager-v3`. +_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-resource_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-resource_manager-v3`. + +### 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-resource_manager/Rakefile b/owl-bot-staging/google-cloud-resource_manager/Rakefile new file mode 100644 index 000000000000..46ca31bfc501 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/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 = true +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-resource_manager 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/resource_manager/v3/folders/credentials" + ::Google::Cloud::ResourceManager::V3::Folders::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-resource_manager 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-resource_manager 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-resource_manager 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-resource_manager gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-resource_manager" + header "google-cloud-resource_manager rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-resource_manager yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-resource_manager 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-resource_manager 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-resource_manager 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-resource_manager/google-cloud-resource_manager.gemspec b/owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec new file mode 100644 index 000000000000..9d4a1c47ebb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/resource_manager/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-resource_manager" + gem.version = Google::Cloud::ResourceManager::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Creates, reads, and updates metadata for Google Cloud Platform resource containers." + gem.summary = "Creates, reads, and updates metadata for Google Cloud Platform resource containers." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts", "MIGRATING.md"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-resource_manager-v3", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb new file mode 100644 index 000000000000..a17c3b857361 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/resource_manager" unless defined? Google::Cloud::ResourceManager::VERSION diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb new file mode 100644 index 000000000000..62583916a9e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb @@ -0,0 +1,584 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/resource_manager/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :resource_manager do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module ResourceManager + ## + # Create a new client object for Folders. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::Folders::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Folders-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Folders service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Folders service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.folders_available?}. + # + # ## About Folders + # + # Manages Cloud Platform folder resources. + # Folders can be used to organize the resources under an + # organization and to control the policies applied to groups of resources. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.folders version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Folders) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Folders service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.folders}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Folders service, + # or if the versioned client gem needs an update to support the Folders service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.folders_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :Folders + service_module = service_module.const_get :Folders + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Organizations. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::Organizations::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Organizations-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Organizations service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Organizations service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.organizations_available?}. + # + # ## About Organizations + # + # Allows users to manage their organization resources. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.organizations version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Organizations) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Organizations service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.organizations}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Organizations service, + # or if the versioned client gem needs an update to support the Organizations service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.organizations_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :Organizations + service_module = service_module.const_get :Organizations + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Projects. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::Projects::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Projects-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Projects service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Projects service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.projects_available?}. + # + # ## About Projects + # + # Manages Google Cloud Projects. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.projects version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Projects) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Projects service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.projects}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Projects service, + # or if the versioned client gem needs an update to support the Projects service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.projects_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :Projects + service_module = service_module.const_get :Projects + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for TagBindings. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::TagBindings::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagBindings-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TagBindings service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the TagBindings service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.tag_bindings_available?}. + # + # ## About TagBindings + # + # Allow users to create and manage TagBindings between TagValues and + # different Google Cloud resources throughout the GCP resource hierarchy. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.tag_bindings version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagBindings) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the TagBindings service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_bindings}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the TagBindings service, + # or if the versioned client gem needs an update to support the TagBindings service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.tag_bindings_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :TagBindings + service_module = service_module.const_get :TagBindings + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for TagHolds. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::TagHolds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagHolds-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TagHolds service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the TagHolds service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.tag_holds_available?}. + # + # ## About TagHolds + # + # Allow users to create and manage TagHolds for TagValues. TagHolds represent + # the use of a Tag Value that is not captured by TagBindings but + # should still block TagValue deletion (such as a reference in a policy + # condition). This service provides isolated failure domains by cloud location + # so that TagHolds can be managed in the same location as their usage. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.tag_holds version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagHolds) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the TagHolds service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_holds}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the TagHolds service, + # or if the versioned client gem needs an update to support the TagHolds service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.tag_holds_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :TagHolds + service_module = service_module.const_get :TagHolds + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for TagKeys. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::TagKeys::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagKeys-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TagKeys service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the TagKeys service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.tag_keys_available?}. + # + # ## About TagKeys + # + # Allow users to create and manage tag keys. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.tag_keys version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagKeys) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the TagKeys service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_keys}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the TagKeys service, + # or if the versioned client gem needs an update to support the TagKeys service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.tag_keys_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :TagKeys + service_module = service_module.const_get :TagKeys + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for TagValues. + # + # By default, this returns an instance of + # [Google::Cloud::ResourceManager::V3::TagValues::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagValues-Client) + # for a gRPC client for version V3 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the TagValues service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the TagValues service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ResourceManager.tag_values_available?}. + # + # ## About TagValues + # + # Allow users to create and manage tag values. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.tag_values version: :v3, transport: :grpc, &block + require "google/cloud/resource_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagValues) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the TagValues service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_values}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the TagValues service, + # or if the versioned client gem needs an update to support the TagValues service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v3`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.tag_values_available? version: :v3, transport: :grpc + require "google/cloud/resource_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::ResourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ResourceManager.const_get package_name + return false unless service_module.const_defined? :TagValues + service_module = service_module.const_get :TagValues + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-resource_manager library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.resource_manager if block_given? + + ::Google::Cloud.configure.resource_manager + end + end + end +end + +helper_path = ::File.join __dir__, "resource_manager", "helpers.rb" +require "google/cloud/resource_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb new file mode 100644 index 000000000000..cc2ec91f9504 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.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! + + +module Google + module Cloud + module ResourceManager + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb new file mode 100644 index 000000000000..76d471122b3a --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/resource_manager" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::ResourceManager::ClientConstructionMinitest < 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_folders_grpc + skip unless Google::Cloud::ResourceManager.folders_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.folders transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::Folders::Client, client + end + end + + def test_folders_rest + skip unless Google::Cloud::ResourceManager.folders_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.folders transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::Folders::Rest::Client, client + end + end + + def test_organizations_grpc + skip unless Google::Cloud::ResourceManager.organizations_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.organizations transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::Organizations::Client, client + end + end + + def test_organizations_rest + skip unless Google::Cloud::ResourceManager.organizations_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.organizations transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::Organizations::Rest::Client, client + end + end + + def test_projects_grpc + skip unless Google::Cloud::ResourceManager.projects_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.projects transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::Projects::Client, client + end + end + + def test_projects_rest + skip unless Google::Cloud::ResourceManager.projects_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.projects transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::Projects::Rest::Client, client + end + end + + def test_tag_bindings_grpc + skip unless Google::Cloud::ResourceManager.tag_bindings_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.tag_bindings transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagBindings::Client, client + end + end + + def test_tag_bindings_rest + skip unless Google::Cloud::ResourceManager.tag_bindings_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.tag_bindings transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client, client + end + end + + def test_tag_holds_grpc + skip unless Google::Cloud::ResourceManager.tag_holds_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.tag_holds transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagHolds::Client, client + end + end + + def test_tag_holds_rest + skip unless Google::Cloud::ResourceManager.tag_holds_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.tag_holds transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagHolds::Rest::Client, client + end + end + + def test_tag_keys_grpc + skip unless Google::Cloud::ResourceManager.tag_keys_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.tag_keys transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagKeys::Client, client + end + end + + def test_tag_keys_rest + skip unless Google::Cloud::ResourceManager.tag_keys_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.tag_keys transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagKeys::Rest::Client, client + end + end + + def test_tag_values_grpc + skip unless Google::Cloud::ResourceManager.tag_values_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ResourceManager.tag_values transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagValues::Client, client + end + end + + def test_tag_values_rest + skip unless Google::Cloud::ResourceManager.tag_values_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ResourceManager.tag_values transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ResourceManager::V3::TagValues::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb new file mode 100644 index 000000000000..23c8cdbe40ca --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.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 "helper" +require "google/cloud/resource_manager/version" + +class Google::Cloud::ResourceManager::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::ResourceManager::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/helper.rb b/owl-bot-staging/google-cloud-resource_manager/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-resource_manager/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-retail/.gitignore b/owl-bot-staging/google-cloud-retail/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-retail/.repo-metadata.json b/owl-bot-staging/google-cloud-retail/.repo-metadata.json new file mode 100644 index 000000000000..0bc7656977aa --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "retail.googleapis.com", + "api_shortname": "retail", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-retail/latest", + "distribution_name": "google-cloud-retail", + "is_cloud": true, + "language": "ruby", + "name": "retail", + "name_pretty": "Retail API", + "product_documentation": "https://cloud.google.com/retail/docs/apis", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems.", + "ruby-cloud-env-prefix": "RETAIL", + "ruby-cloud-product-url": "https://cloud.google.com/retail/docs/apis", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-retail/.rubocop.yml b/owl-bot-staging/google-cloud-retail/.rubocop.yml new file mode 100644 index 000000000000..bc5a32420f48 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-retail.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-retail.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-retail/.toys.rb b/owl-bot-staging/google-cloud-retail/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/.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-retail/.yardopts b/owl-bot-staging/google-cloud-retail/.yardopts new file mode 100644 index 000000000000..b19814d452b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Retail API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md b/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md new file mode 100644 index 000000000000..ad65e919dc19 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-retail 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-retail 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/retail" + +client = Google::Cloud::Retail.analytics_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/retail" + +Google::Cloud::Retail.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Retail.analytics_service +``` + +### 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-retail +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/retail" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Retail.analytics_service +``` + +### 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-retail/CHANGELOG.md b/owl-bot-staging/google-cloud-retail/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-retail/Gemfile b/owl-bot-staging/google-cloud-retail/Gemfile new file mode 100644 index 000000000000..27a0cf18da6d --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-retail-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-retail.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-retail/LICENSE.md b/owl-bot-staging/google-cloud-retail/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/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-retail/README.md b/owl-bot-staging/google-cloud-retail/README.md new file mode 100644 index 000000000000..b4176b0668a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Retail API + +API Client library for the Retail API + +Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-retail-v*`. +The gem `google-cloud-retail` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-retail/latest) +for this library, google-cloud-retail, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-retail-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest). + +See also the [Product Documentation](https://cloud.google.com/retail/docs/apis) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-retail +``` + +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/retail.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/retail" + +client = Google::Cloud::Retail.analytics_service +request = ::Google::Cloud::Retail::V2::ExportAnalyticsMetricsRequest.new # (request fields as keyword arguments...) +response = client.export_analytics_metrics request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-retail-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-retail`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-retail-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-retail`. +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-retail-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-retail/Rakefile b/owl-bot-staging/google-cloud-retail/Rakefile new file mode 100644 index 000000000000..b6f97c47d721 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/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 = true +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-retail acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["RETAIL_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["RETAIL_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["RETAIL_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 RETAIL_TEST_PROJECT=test123 RETAIL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/retail/v2/analytics_service/credentials" + ::Google::Cloud::Retail::V2::AnalyticsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["RETAIL_PROJECT"] = project + ENV["RETAIL_TEST_PROJECT"] = project + ENV["RETAIL_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-retail 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-retail 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-retail 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-retail gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-retail" + header "google-cloud-retail rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-retail yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-retail 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-retail 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-retail 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-retail/google-cloud-retail.gemspec b/owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec new file mode 100644 index 000000000000..4f58ffe5832a --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/retail/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-retail" + gem.version = Google::Cloud::Retail::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems." + gem.summary = "API Client library for the Retail 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-retail-v2", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb b/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb new file mode 100644 index 000000000000..5d5f31cfdc1d --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/retail" unless defined? Google::Cloud::Retail::VERSION diff --git a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb new file mode 100644 index 000000000000..2e2588f59658 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb @@ -0,0 +1,950 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/retail/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :retail do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Retail + ## + # Create a new client object for AnalyticsService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::AnalyticsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AnalyticsService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AnalyticsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the AnalyticsService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.analytics_service_available?}. + # + # ## About AnalyticsService + # + # Service for managing & accessing retail search business metric. + # Retail recommendation business metric is currently not available. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.analytics_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:AnalyticsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the AnalyticsService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.analytics_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the AnalyticsService service, + # or if the versioned client gem needs an update to support the AnalyticsService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.analytics_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :AnalyticsService + service_module = service_module.const_get :AnalyticsService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for CatalogService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::CatalogService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CatalogService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CatalogService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.catalog_service_available?}. + # + # ## About CatalogService + # + # Service for managing catalog configuration. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.catalog_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CatalogService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CatalogService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.catalog_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CatalogService service, + # or if the versioned client gem needs an update to support the CatalogService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.catalog_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :CatalogService + service_module = service_module.const_get :CatalogService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for CompletionService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CompletionService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CompletionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CompletionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.completion_service_available?}. + # + # ## About CompletionService + # + # Autocomplete service for retail. + # + # This feature is only available for users who have Retail Search enabled. + # Enable Retail Search on Cloud Console before using this feature. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.completion_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CompletionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CompletionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.completion_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CompletionService service, + # or if the versioned client gem needs an update to support the CompletionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.completion_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :CompletionService + service_module = service_module.const_get :CompletionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ControlService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ControlService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ControlService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ControlService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.control_service_available?}. + # + # ## About ControlService + # + # Service for modifying Control. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.control_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ControlService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ControlService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.control_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ControlService service, + # or if the versioned client gem needs an update to support the ControlService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.control_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :ControlService + service_module = service_module.const_get :ControlService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for SearchService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SearchService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SearchService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.search_service_available?}. + # + # ## About SearchService + # + # Service for search. + # + # This feature is only available for users who have Retail Search enabled. + # Enable Retail Search on Cloud Console before using this feature. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.search_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:SearchService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SearchService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.search_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SearchService service, + # or if the versioned client gem needs an update to support the SearchService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.search_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :SearchService + service_module = service_module.const_get :SearchService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ConversationalSearchService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::ConversationalSearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ConversationalSearchService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ConversationalSearchService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ConversationalSearchService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.conversational_search_service_available?}. + # + # ## About ConversationalSearchService + # + # Service for retail conversational search. + # + # This feature is only available for users who have Retail Conversational + # Search enabled. Enable Retail Conversational Search on Cloud Console + # before using this feature. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.conversational_search_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ConversationalSearchService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ConversationalSearchService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.conversational_search_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ConversationalSearchService service, + # or if the versioned client gem needs an update to support the ConversationalSearchService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.conversational_search_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :ConversationalSearchService + service_module = service_module.const_get :ConversationalSearchService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for GenerativeQuestionService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::GenerativeQuestionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-GenerativeQuestionService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the GenerativeQuestionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the GenerativeQuestionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.generative_question_service_available?}. + # + # ## About GenerativeQuestionService + # + # Service for managing LLM generated questions in search serving. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.generative_question_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:GenerativeQuestionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the GenerativeQuestionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.generative_question_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the GenerativeQuestionService service, + # or if the versioned client gem needs an update to support the GenerativeQuestionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.generative_question_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :GenerativeQuestionService + service_module = service_module.const_get :GenerativeQuestionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ModelService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::ModelService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ModelService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ModelService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ModelService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.model_service_available?}. + # + # ## About ModelService + # + # Service for performing CRUD operations on models. + # Recommendation models contain all the metadata necessary to generate a set of + # models for the `Predict()` API. A model is queried + # indirectly via a ServingConfig, which associates a model with a + # given Placement (e.g. Frequently Bought Together on Home Page). + # + # This service allows you to do the following: + # + # * Initiate training of a model. + # * Pause training of an existing model. + # * List all the available models along with their metadata. + # * Control their tuning schedule. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.model_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ModelService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ModelService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.model_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ModelService service, + # or if the versioned client gem needs an update to support the ModelService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.model_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :ModelService + service_module = service_module.const_get :ModelService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for PredictionService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::PredictionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-PredictionService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PredictionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the PredictionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.prediction_service_available?}. + # + # ## About PredictionService + # + # Service for making recommendation prediction. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.prediction_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:PredictionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the PredictionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.prediction_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PredictionService service, + # or if the versioned client gem needs an update to support the PredictionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.prediction_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :PredictionService + service_module = service_module.const_get :PredictionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ProductService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::ProductService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ProductService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ProductService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ProductService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.product_service_available?}. + # + # ## About ProductService + # + # Service for ingesting Product information + # of the customer's website. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.product_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ProductService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ProductService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.product_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ProductService service, + # or if the versioned client gem needs an update to support the ProductService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.product_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :ProductService + service_module = service_module.const_get :ProductService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ServingConfigService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::ServingConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ServingConfigService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ServingConfigService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ServingConfigService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.serving_config_service_available?}. + # + # ## About ServingConfigService + # + # Service for modifying ServingConfig. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.serving_config_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ServingConfigService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ServingConfigService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.serving_config_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ServingConfigService service, + # or if the versioned client gem needs an update to support the ServingConfigService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.serving_config_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :ServingConfigService + service_module = service_module.const_get :ServingConfigService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for UserEventService. + # + # By default, this returns an instance of + # [Google::Cloud::Retail::V2::UserEventService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-UserEventService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the UserEventService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the UserEventService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Retail.user_event_service_available?}. + # + # ## About UserEventService + # + # Service for ingesting end user actions on the customer website. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.user_event_service version: :v2, transport: :grpc, &block + require "google/cloud/retail/#{version.to_s.downcase}" + + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Retail.const_get(package_name).const_get(:UserEventService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the UserEventService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Retail.user_event_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the UserEventService service, + # or if the versioned client gem needs an update to support the UserEventService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.user_event_service_available? version: :v2, transport: :grpc + require "google/cloud/retail/#{version.to_s.downcase}" + package_name = Google::Cloud::Retail + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Retail.const_get package_name + return false unless service_module.const_defined? :UserEventService + service_module = service_module.const_get :UserEventService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-retail library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.retail if block_given? + + ::Google::Cloud.configure.retail + end + end + end +end + +helper_path = ::File.join __dir__, "retail", "helpers.rb" +require "google/cloud/retail/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb new file mode 100644 index 000000000000..e74c93ac7413 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.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! + + +module Google + module Cloud + module Retail + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb new file mode 100644 index 000000000000..66c341b97da2 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb @@ -0,0 +1,295 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/retail" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Retail::ClientConstructionMinitest < 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_analytics_service_grpc + skip unless Google::Cloud::Retail.analytics_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.analytics_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::AnalyticsService::Client, client + end + end + + def test_analytics_service_rest + skip unless Google::Cloud::Retail.analytics_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.analytics_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::AnalyticsService::Rest::Client, client + end + end + + def test_catalog_service_grpc + skip unless Google::Cloud::Retail.catalog_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.catalog_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::CatalogService::Client, client + end + end + + def test_catalog_service_rest + skip unless Google::Cloud::Retail.catalog_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.catalog_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::CatalogService::Rest::Client, client + end + end + + def test_completion_service_grpc + skip unless Google::Cloud::Retail.completion_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.completion_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::CompletionService::Client, client + end + end + + def test_completion_service_rest + skip unless Google::Cloud::Retail.completion_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.completion_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::CompletionService::Rest::Client, client + end + end + + def test_control_service_grpc + skip unless Google::Cloud::Retail.control_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.control_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::ControlService::Client, client + end + end + + def test_control_service_rest + skip unless Google::Cloud::Retail.control_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.control_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::ControlService::Rest::Client, client + end + end + + def test_search_service_grpc + skip unless Google::Cloud::Retail.search_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.search_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::SearchService::Client, client + end + end + + def test_search_service_rest + skip unless Google::Cloud::Retail.search_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.search_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::SearchService::Rest::Client, client + end + end + + def test_conversational_search_service_grpc + skip unless Google::Cloud::Retail.conversational_search_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.conversational_search_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::ConversationalSearchService::Client, client + end + end + + def test_conversational_search_service_rest + skip unless Google::Cloud::Retail.conversational_search_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.conversational_search_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::ConversationalSearchService::Rest::Client, client + end + end + + def test_generative_question_service_grpc + skip unless Google::Cloud::Retail.generative_question_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.generative_question_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::GenerativeQuestionService::Client, client + end + end + + def test_generative_question_service_rest + skip unless Google::Cloud::Retail.generative_question_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.generative_question_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client, client + end + end + + def test_model_service_grpc + skip unless Google::Cloud::Retail.model_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.model_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::ModelService::Client, client + end + end + + def test_model_service_rest + skip unless Google::Cloud::Retail.model_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.model_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::ModelService::Rest::Client, client + end + end + + def test_prediction_service_grpc + skip unless Google::Cloud::Retail.prediction_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.prediction_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::PredictionService::Client, client + end + end + + def test_prediction_service_rest + skip unless Google::Cloud::Retail.prediction_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.prediction_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::PredictionService::Rest::Client, client + end + end + + def test_product_service_grpc + skip unless Google::Cloud::Retail.product_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.product_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::ProductService::Client, client + end + end + + def test_product_service_rest + skip unless Google::Cloud::Retail.product_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.product_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::ProductService::Rest::Client, client + end + end + + def test_serving_config_service_grpc + skip unless Google::Cloud::Retail.serving_config_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.serving_config_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::ServingConfigService::Client, client + end + end + + def test_serving_config_service_rest + skip unless Google::Cloud::Retail.serving_config_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.serving_config_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::ServingConfigService::Rest::Client, client + end + end + + def test_user_event_service_grpc + skip unless Google::Cloud::Retail.user_event_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Retail.user_event_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Retail::V2::UserEventService::Client, client + end + end + + def test_user_event_service_rest + skip unless Google::Cloud::Retail.user_event_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Retail.user_event_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Retail::V2::UserEventService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb new file mode 100644 index 000000000000..d6b0727bd7a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.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 "helper" +require "google/cloud/retail/version" + +class Google::Cloud::Retail::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Retail::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-retail/test/helper.rb b/owl-bot-staging/google-cloud-retail/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-retail/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-run-client/.gitignore b/owl-bot-staging/google-cloud-run-client/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-run-client/.repo-metadata.json b/owl-bot-staging/google-cloud-run-client/.repo-metadata.json new file mode 100644 index 000000000000..4ae6c80548ae --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "run.googleapis.com", + "api_shortname": "run", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-run/latest", + "distribution_name": "google-cloud-run", + "is_cloud": true, + "language": "ruby", + "name": "run", + "name_pretty": "Cloud Run API", + "product_documentation": "https://cloud.google.com/run", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests.", + "ruby-cloud-product-url": "https://cloud.google.com/run", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-run-client/.rubocop.yml b/owl-bot-staging/google-cloud-run-client/.rubocop.yml new file mode 100644 index 000000000000..ad7933d2c5c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-run.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-run.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-run-client/.toys.rb b/owl-bot-staging/google-cloud-run-client/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/.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-run-client/.yardopts b/owl-bot-staging/google-cloud-run-client/.yardopts new file mode 100644 index 000000000000..a35195cf2f13 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Run API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md b/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md new file mode 100644 index 000000000000..cb9bbe37a075 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-run 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-run 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/run" + +client = Google::Cloud::Run.builds do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/run" + +Google::Cloud::Run.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Run.builds +``` + +### 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-run +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/run" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Run.builds +``` + +### 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-run-client/CHANGELOG.md b/owl-bot-staging/google-cloud-run-client/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-run-client/Gemfile b/owl-bot-staging/google-cloud-run-client/Gemfile new file mode 100644 index 000000000000..c71b070720d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-run-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-run.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-run-client/LICENSE.md b/owl-bot-staging/google-cloud-run-client/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/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-run-client/README.md b/owl-bot-staging/google-cloud-run-client/README.md new file mode 100644 index 000000000000..4893b65a7db4 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Cloud Run API + +API Client library for the Cloud Run API + +Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-run-v*`. +The gem `google-cloud-run` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-run/latest) +for this library, google-cloud-run, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest). + +See also the [Product Documentation](https://cloud.google.com/run) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-run +``` + +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/run.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/run" + +client = Google::Cloud::Run.builds +request = ::Google::Cloud::Run::V2::SubmitBuildRequest.new # (request fields as keyword arguments...) +response = client.submit_build request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-run`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-run-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-run`. +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-run-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-run-client/Rakefile b/owl-bot-staging/google-cloud-run-client/Rakefile new file mode 100644 index 000000000000..7e92d30093b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/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 = true +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-run 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/run/v2/builds/credentials" + ::Google::Cloud::Run::V2::Builds::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-run 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-run 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-run 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-run gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-run" + header "google-cloud-run rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-run yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-run 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-run 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-run 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-run-client/google-cloud-run.gemspec b/owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec new file mode 100644 index 000000000000..541551c12ae3 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/run/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-run" + gem.version = Google::Cloud::Run::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests." + gem.summary = "API Client library for the Cloud Run 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-run-v2", ">= 0.17", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb b/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb new file mode 100644 index 000000000000..5decb206ead1 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/run" unless defined? Google::Cloud::Run::VERSION diff --git a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb new file mode 100644 index 000000000000..1b1abc983569 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/run/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :run do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Run + ## + # Create a new client object for Builds. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Builds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Builds-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Builds service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Builds service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.builds_available?}. + # + # ## About Builds + # + # Cloud Run Build Control Plane API + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.builds version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Builds) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Builds service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.builds}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Builds service, + # or if the versioned client gem needs an update to support the Builds service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.builds_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Builds + service_module = service_module.const_get :Builds + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Executions. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Executions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Executions-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Executions service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Executions service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.executions_available?}. + # + # ## About Executions + # + # Cloud Run Execution Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.executions version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Executions) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Executions service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.executions}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Executions service, + # or if the versioned client gem needs an update to support the Executions service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.executions_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Executions + service_module = service_module.const_get :Executions + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Instances. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Instances::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Instances-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Instances service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Instances service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.instances_available?}. + # + # ## About Instances + # + # The Cloud Run Instances API allows you to manage Cloud Run Instances. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.instances version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Instances) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Instances service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.instances}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Instances service, + # or if the versioned client gem needs an update to support the Instances service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.instances_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Instances + service_module = service_module.const_get :Instances + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Jobs. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Jobs::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Jobs-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Jobs service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Jobs service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.jobs_available?}. + # + # ## About Jobs + # + # Cloud Run Job Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.jobs version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Jobs) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Jobs service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.jobs}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Jobs service, + # or if the versioned client gem needs an update to support the Jobs service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.jobs_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Jobs + service_module = service_module.const_get :Jobs + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Revisions. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Revisions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Revisions-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Revisions service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Revisions service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.revisions_available?}. + # + # ## About Revisions + # + # Cloud Run Revision Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.revisions version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Revisions) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Revisions service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.revisions}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Revisions service, + # or if the versioned client gem needs an update to support the Revisions service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.revisions_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Revisions + service_module = service_module.const_get :Revisions + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Services. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Services::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Services-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Services service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Services service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.services_available?}. + # + # ## About Services + # + # Cloud Run Service Control Plane API + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.services version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Services) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Services service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.services}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Services service, + # or if the versioned client gem needs an update to support the Services service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.services_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Services + service_module = service_module.const_get :Services + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for Tasks. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::Tasks::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Tasks-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Tasks service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Tasks service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.tasks_available?}. + # + # ## About Tasks + # + # Cloud Run Task Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.tasks version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:Tasks) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Tasks service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.tasks}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Tasks service, + # or if the versioned client gem needs an update to support the Tasks service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.tasks_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :Tasks + service_module = service_module.const_get :Tasks + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for WorkerPools. + # + # By default, this returns an instance of + # [Google::Cloud::Run::V2::WorkerPools::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-WorkerPools-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the WorkerPools service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the WorkerPools service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Run.worker_pools_available?}. + # + # ## About WorkerPools + # + # Cloud Run WorkerPool Control Plane API. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.worker_pools version: :v2, transport: :grpc, &block + require "google/cloud/run/#{version.to_s.downcase}" + + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Run.const_get(package_name).const_get(:WorkerPools) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the WorkerPools service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Run.worker_pools}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the WorkerPools service, + # or if the versioned client gem needs an update to support the WorkerPools service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.worker_pools_available? version: :v2, transport: :grpc + require "google/cloud/run/#{version.to_s.downcase}" + package_name = Google::Cloud::Run + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Run.const_get package_name + return false unless service_module.const_defined? :WorkerPools + service_module = service_module.const_get :WorkerPools + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-run library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.run if block_given? + + ::Google::Cloud.configure.run + end + end + end +end + +helper_path = ::File.join __dir__, "run", "helpers.rb" +require "google/cloud/run/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb new file mode 100644 index 000000000000..09106e21d937 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.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! + + +module Google + module Cloud + module Run + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb new file mode 100644 index 000000000000..798955480791 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/run" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Run::ClientConstructionMinitest < 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_builds_grpc + skip unless Google::Cloud::Run.builds_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.builds transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Builds::Client, client + end + end + + def test_builds_rest + skip unless Google::Cloud::Run.builds_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.builds transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Builds::Rest::Client, client + end + end + + def test_executions_grpc + skip unless Google::Cloud::Run.executions_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.executions transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Executions::Client, client + end + end + + def test_executions_rest + skip unless Google::Cloud::Run.executions_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.executions transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Executions::Rest::Client, client + end + end + + def test_instances_grpc + skip unless Google::Cloud::Run.instances_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.instances transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Instances::Client, client + end + end + + def test_instances_rest + skip unless Google::Cloud::Run.instances_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.instances transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Instances::Rest::Client, client + end + end + + def test_jobs_grpc + skip unless Google::Cloud::Run.jobs_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.jobs transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Jobs::Client, client + end + end + + def test_jobs_rest + skip unless Google::Cloud::Run.jobs_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.jobs transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Jobs::Rest::Client, client + end + end + + def test_revisions_grpc + skip unless Google::Cloud::Run.revisions_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.revisions transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Revisions::Client, client + end + end + + def test_revisions_rest + skip unless Google::Cloud::Run.revisions_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.revisions transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Revisions::Rest::Client, client + end + end + + def test_services_grpc + skip unless Google::Cloud::Run.services_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.services transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Services::Client, client + end + end + + def test_services_rest + skip unless Google::Cloud::Run.services_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.services transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Services::Rest::Client, client + end + end + + def test_tasks_grpc + skip unless Google::Cloud::Run.tasks_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.tasks transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::Tasks::Client, client + end + end + + def test_tasks_rest + skip unless Google::Cloud::Run.tasks_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.tasks transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::Tasks::Rest::Client, client + end + end + + def test_worker_pools_grpc + skip unless Google::Cloud::Run.worker_pools_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Run.worker_pools transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Run::V2::WorkerPools::Client, client + end + end + + def test_worker_pools_rest + skip unless Google::Cloud::Run.worker_pools_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Run.worker_pools transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Run::V2::WorkerPools::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb new file mode 100644 index 000000000000..95d32d7c9348 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.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 "helper" +require "google/cloud/run/version" + +class Google::Cloud::Run::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Run::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-run-client/test/helper.rb b/owl-bot-staging/google-cloud-run-client/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-run-client/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json new file mode 100644 index 000000000000..a0d73e374874 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "saasservicemgmt.googleapis.com", + "api_shortname": "saasservicemgmt", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt/latest", + "distribution_name": "google-cloud-saas_platform-saas_service_mgmt", + "is_cloud": true, + "language": "ruby", + "name": "saasservicemgmt", + "name_pretty": "App Lifecycle Manager API", + "product_documentation": "https://cloud.google.com/saas-runtime/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "App Lifecycle Manager Overview.", + "ruby-cloud-product-url": "https://cloud.google.com/saas-runtime/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml new file mode 100644 index 000000000000..ddc9f5e4cb50 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-saas_platform-saas_service_mgmt.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-saas_platform-saas_service_mgmt.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.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-saas_platform-saas_service_mgmt/.yardopts b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts new file mode 100644 index 000000000000..98d93f183c67 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="App Lifecycle Manager API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md new file mode 100644 index 000000000000..95988c838d8f --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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/saas_platform/saas_service_mgmt" + +client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/saas_platform/saas_service_mgmt" + +Google::Cloud::SaasPlatform::SaasServiceMgmt.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments +``` + +### 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-saas_platform-saas_service_mgmt +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/saas_platform/saas_service_mgmt" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments +``` + +### 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-saas_platform-saas_service_mgmt/CHANGELOG.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile new file mode 100644 index 000000000000..8f88307f27d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-saas_platform-saas_service_mgmt-v1beta1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-saas_platform-saas_service_mgmt.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/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-saas_platform-saas_service_mgmt/README.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md new file mode 100644 index 000000000000..b493365a5ecf --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the App Lifecycle Manager API + +Model, deploy, and operate your SaaS at scale. + +App Lifecycle Manager Overview. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-saas_platform-saas_service_mgmt-v*`. +The gem `google-cloud-saas_platform-saas_service_mgmt` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt/latest) +for this library, google-cloud-saas_platform-saas_service_mgmt, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-saas_platform-saas_service_mgmt-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest). + +See also the [Product Documentation](https://cloud.google.com/saas-runtime/docs/overview) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-saas_platform-saas_service_mgmt +``` + +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/saasservicemgmt.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/saas_platform/saas_service_mgmt" + +client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments +request = ::Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::ListSaasRequest.new # (request fields as keyword arguments...) +response = client.list_saas request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-saas_platform-saas_service_mgmt-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-saas_platform-saas_service_mgmt`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-saas_platform-saas_service_mgmt-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-saas_platform-saas_service_mgmt`. +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-saas_platform-saas_service_mgmt-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-saas_platform-saas_service_mgmt/Rakefile b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Rakefile new file mode 100644 index 000000000000..10f8c02a616a --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/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 = true +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-saas_platform-saas_service_mgmt 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/saas_platform/saas_service_mgmt/v1beta1/saas_deployments/credentials" + ::Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-saas_platform-saas_service_mgmt" + header "google-cloud-saas_platform-saas_service_mgmt rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-saas_platform-saas_service_mgmt yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec new file mode 100644 index 000000000000..874144065ddf --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/saas_platform/saas_service_mgmt/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-saas_platform-saas_service_mgmt" + gem.version = Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "App Lifecycle Manager Overview." + gem.summary = "Model, deploy, and operate your SaaS at scale." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-saas_platform-saas_service_mgmt-v1beta1", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb new file mode 100644 index 000000000000..864dbb472e44 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/saas_platform/saas_service_mgmt" unless defined? Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb new file mode 100644 index 000000000000..938eab48ac66 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/saas_platform/saas_service_mgmt/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :saas_platform_saas_service_mgmt do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module SaasPlatform + module SaasServiceMgmt + ## + # Create a new client object for SaasDeployments. + # + # By default, this returns an instance of + # [Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest/Google-Cloud-SaasPlatform-SaasServiceMgmt-V1beta1-SaasDeployments-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SaasDeployments service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SaasDeployments service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available?}. + # + # ## About SaasDeployments + # + # Manages the deployment of SaaS services. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.saas_deployments version: :v1beta1, transport: :grpc, &block + require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" + + package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get(package_name).const_get(:SaasDeployments) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SaasDeployments service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SaasDeployments service, + # or if the versioned client gem needs an update to support the SaasDeployments service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.saas_deployments_available? version: :v1beta1, transport: :grpc + require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" + package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get package_name + return false unless service_module.const_defined? :SaasDeployments + service_module = service_module.const_get :SaasDeployments + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for SaasRollouts. + # + # By default, this returns an instance of + # [Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest/Google-Cloud-SaasPlatform-SaasServiceMgmt-V1beta1-SaasRollouts-Client) + # for a gRPC client for version V1beta1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SaasRollouts service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SaasRollouts service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available?}. + # + # ## About SaasRollouts + # + # Manages the rollout of SaaS services. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.saas_rollouts version: :v1beta1, transport: :grpc, &block + require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" + + package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get(package_name).const_get(:SaasRollouts) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SaasRollouts service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SaasRollouts service, + # or if the versioned client gem needs an update to support the SaasRollouts service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.saas_rollouts_available? version: :v1beta1, transport: :grpc + require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" + package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get package_name + return false unless service_module.const_defined? :SaasRollouts + service_module = service_module.const_get :SaasRollouts + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-saas_platform-saas_service_mgmt library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.saas_platform_saas_service_mgmt if block_given? + + ::Google::Cloud.configure.saas_platform_saas_service_mgmt + end + end + end + end +end + +helper_path = ::File.join __dir__, "saas_service_mgmt", "helpers.rb" +require "google/cloud/saas_platform/saas_service_mgmt/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb new file mode 100644 index 000000000000..702f6d719d26 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/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 SaasPlatform + module SaasServiceMgmt + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb new file mode 100644 index 000000000000..75a386d33524 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.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! + +require "helper" +require "google/cloud/saas_platform/saas_service_mgmt" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::SaasPlatform::SaasServiceMgmt::ClientConstructionMinitest < 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_saas_deployments_grpc + skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Client, client + end + end + + def test_saas_deployments_rest + skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Rest::Client, client + end + end + + def test_saas_rollouts_grpc + skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Client, client + end + end + + def test_saas_rollouts_rest + skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb new file mode 100644 index 000000000000..b5ea633ed383 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.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 "helper" +require "google/cloud/saas_platform/saas_service_mgmt/version" + +class Google::Cloud::SaasPlatform::SaasServiceMgmt::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-scheduler/.gitignore b/owl-bot-staging/google-cloud-scheduler/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json b/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json new file mode 100644 index 000000000000..fe18ddd5c2a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudscheduler.googleapis.com", + "api_shortname": "cloudscheduler", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler/latest", + "distribution_name": "google-cloud-scheduler", + "is_cloud": true, + "language": "ruby", + "name": "cloudscheduler", + "name_pretty": "Cloud Scheduler API", + "product_documentation": "https://cloud.google.com/scheduler", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place.", + "ruby-cloud-env-prefix": "SCHEDULER", + "ruby-cloud-product-url": "https://cloud.google.com/scheduler", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-scheduler/.rubocop.yml b/owl-bot-staging/google-cloud-scheduler/.rubocop.yml new file mode 100644 index 000000000000..8b70a3970a2e --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-scheduler.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-scheduler.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-scheduler/.toys.rb b/owl-bot-staging/google-cloud-scheduler/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/.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-scheduler/.yardopts b/owl-bot-staging/google-cloud-scheduler/.yardopts new file mode 100644 index 000000000000..0a96e817b4db --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Scheduler API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md b/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md new file mode 100644 index 000000000000..2fc051ac6297 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-scheduler 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-scheduler 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/scheduler" + +client = Google::Cloud::Scheduler.cloud_scheduler do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/scheduler" + +Google::Cloud::Scheduler.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Scheduler.cloud_scheduler +``` + +### 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-scheduler +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/scheduler" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Scheduler.cloud_scheduler +``` + +### 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-scheduler/CHANGELOG.md b/owl-bot-staging/google-cloud-scheduler/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-scheduler/Gemfile b/owl-bot-staging/google-cloud-scheduler/Gemfile new file mode 100644 index 000000000000..c44a1a569acd --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-scheduler-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-scheduler.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-scheduler/LICENSE.md b/owl-bot-staging/google-cloud-scheduler/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/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-scheduler/README.md b/owl-bot-staging/google-cloud-scheduler/README.md new file mode 100644 index 000000000000..6454399e8791 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Cloud Scheduler API + +API Client library for the Cloud Scheduler API + +Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-scheduler-v*`. +The gem `google-cloud-scheduler` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler/latest) +for this library, google-cloud-scheduler, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/scheduler) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-scheduler +``` + +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/cloudscheduler.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/scheduler" + +client = Google::Cloud::Scheduler.cloud_scheduler +request = ::Google::Cloud::Scheduler::V1::ListJobsRequest.new # (request fields as keyword arguments...) +response = client.list_jobs request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-scheduler`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-scheduler-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-scheduler`. +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-scheduler-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-scheduler/Rakefile b/owl-bot-staging/google-cloud-scheduler/Rakefile new file mode 100644 index 000000000000..ca517666c458 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/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 = true +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-scheduler acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SCHEDULER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SCHEDULER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SCHEDULER_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 SCHEDULER_TEST_PROJECT=test123 SCHEDULER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/scheduler/v1/cloud_scheduler/credentials" + ::Google::Cloud::Scheduler::V1::CloudScheduler::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SCHEDULER_PROJECT"] = project + ENV["SCHEDULER_TEST_PROJECT"] = project + ENV["SCHEDULER_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-scheduler 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-scheduler 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-scheduler 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-scheduler gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-scheduler" + header "google-cloud-scheduler rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-scheduler yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-scheduler 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-scheduler 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-scheduler 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-scheduler/google-cloud-scheduler.gemspec b/owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec new file mode 100644 index 000000000000..51b6de1bf848 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/scheduler/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-scheduler" + gem.version = Google::Cloud::Scheduler::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place." + gem.summary = "API Client library for the Cloud Scheduler 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-scheduler-v1", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb b/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb new file mode 100644 index 000000000000..5dbd39bbc30f --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/scheduler" unless defined? Google::Cloud::Scheduler::VERSION diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb new file mode 100644 index 000000000000..086445509c72 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/scheduler/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :scheduler do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Scheduler + ## + # Create a new client object for CloudScheduler. + # + # By default, this returns an instance of + # [Google::Cloud::Scheduler::V1::CloudScheduler::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest/Google-Cloud-Scheduler-V1-CloudScheduler-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CloudScheduler service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CloudScheduler service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Scheduler.cloud_scheduler_available?}. + # + # ## About CloudScheduler + # + # The Cloud Scheduler API allows external entities to reliably + # schedule asynchronous jobs. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cloud_scheduler version: :v1, transport: :grpc, &block + require "google/cloud/scheduler/#{version.to_s.downcase}" + + package_name = Google::Cloud::Scheduler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Scheduler.const_get(package_name).const_get(:CloudScheduler) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CloudScheduler service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Scheduler.cloud_scheduler}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CloudScheduler service, + # or if the versioned client gem needs an update to support the CloudScheduler service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cloud_scheduler_available? version: :v1, transport: :grpc + require "google/cloud/scheduler/#{version.to_s.downcase}" + package_name = Google::Cloud::Scheduler + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Scheduler.const_get package_name + return false unless service_module.const_defined? :CloudScheduler + service_module = service_module.const_get :CloudScheduler + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-scheduler library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.scheduler if block_given? + + ::Google::Cloud.configure.scheduler + end + end + end +end + +helper_path = ::File.join __dir__, "scheduler", "helpers.rb" +require "google/cloud/scheduler/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb new file mode 100644 index 000000000000..c4e8d11ea4bc --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.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! + + +module Google + module Cloud + module Scheduler + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb new file mode 100644 index 000000000000..5ab48d5d0553 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/scheduler" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Scheduler::ClientConstructionMinitest < 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_cloud_scheduler_grpc + skip unless Google::Cloud::Scheduler.cloud_scheduler_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Scheduler.cloud_scheduler transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Scheduler::V1::CloudScheduler::Client, client + end + end + + def test_cloud_scheduler_rest + skip unless Google::Cloud::Scheduler.cloud_scheduler_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Scheduler.cloud_scheduler transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Scheduler::V1::CloudScheduler::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb new file mode 100644 index 000000000000..02bfe3ac6be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.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 "helper" +require "google/cloud/scheduler/version" + +class Google::Cloud::Scheduler::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Scheduler::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-scheduler/test/helper.rb b/owl-bot-staging/google-cloud-scheduler/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-scheduler/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-secret_manager/.gitignore b/owl-bot-staging/google-cloud-secret_manager/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json new file mode 100644 index 000000000000..2841043a0679 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "secretmanager.googleapis.com", + "api_shortname": "secretmanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager/latest", + "distribution_name": "google-cloud-secret_manager", + "is_cloud": true, + "language": "ruby", + "name": "secretmanager", + "name_pretty": "Secret Manager API", + "product_documentation": "https://cloud.google.com/secret-manager", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud.", + "ruby-cloud-env-prefix": "SECRET_MANAGER", + "ruby-cloud-product-url": "https://cloud.google.com/secret-manager", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml new file mode 100644 index 000000000000..f23c496220e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-secret_manager.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-secret_manager.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager/.toys.rb b/owl-bot-staging/google-cloud-secret_manager/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/.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-secret_manager/.yardopts b/owl-bot-staging/google-cloud-secret_manager/.yardopts new file mode 100644 index 000000000000..124a053abd98 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Secret Manager API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md new file mode 100644 index 000000000000..7fd185b48c4a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-secret_manager 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-secret_manager 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/secret_manager" + +client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/secret_manager" + +Google::Cloud::SecretManager.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::SecretManager.secret_manager_service +``` + +### 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-secret_manager +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/secret_manager" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::SecretManager.secret_manager_service +``` + +### 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-secret_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-secret_manager/Gemfile b/owl-bot-staging/google-cloud-secret_manager/Gemfile new file mode 100644 index 000000000000..2fe2a37e1ebe --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-secret_manager-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-secret_manager.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-secret_manager/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/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-secret_manager/README.md b/owl-bot-staging/google-cloud-secret_manager/README.md new file mode 100644 index 000000000000..cad671b45c7d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Secret Manager API + +API Client library for the Secret Manager API + +Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-secret_manager-v*`. +The gem `google-cloud-secret_manager` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager/latest) +for this library, google-cloud-secret_manager, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/secret-manager) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-secret_manager +``` + +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/secretmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/secret_manager" + +client = Google::Cloud::SecretManager.secret_manager_service +request = ::Google::Cloud::SecretManager::V1::ListSecretsRequest.new # (request fields as keyword arguments...) +response = client.list_secrets request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-secret_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-secret_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-secret_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-secret_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-secret_manager/Rakefile b/owl-bot-staging/google-cloud-secret_manager/Rakefile new file mode 100644 index 000000000000..fde45ed3739d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/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 = true +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-secret_manager acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SECRET_MANAGER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SECRET_MANAGER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SECRET_MANAGER_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 SECRET_MANAGER_TEST_PROJECT=test123 SECRET_MANAGER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/secret_manager/v1/secret_manager_service/credentials" + ::Google::Cloud::SecretManager::V1::SecretManagerService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SECRET_MANAGER_PROJECT"] = project + ENV["SECRET_MANAGER_TEST_PROJECT"] = project + ENV["SECRET_MANAGER_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-secret_manager 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-secret_manager 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-secret_manager 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-secret_manager gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-secret_manager" + header "google-cloud-secret_manager rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-secret_manager yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-secret_manager 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-secret_manager 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-secret_manager 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-secret_manager/google-cloud-secret_manager.gemspec b/owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec new file mode 100644 index 000000000000..a74c00324f0b --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/secret_manager/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-secret_manager" + gem.version = Google::Cloud::SecretManager::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud." + gem.summary = "API Client library for the Secret Manager 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-secret_manager-v1", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb new file mode 100644 index 000000000000..ed54373735d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secret_manager" unless defined? Google::Cloud::SecretManager::VERSION diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb new file mode 100644 index 000000000000..0d7f99c14013 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/secret_manager/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :secret_manager do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module SecretManager + ## + # Create a new client object for SecretManagerService. + # + # By default, this returns an instance of + # [Google::Cloud::SecretManager::V1::SecretManagerService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretManagerService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SecretManagerService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the SecretManagerService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SecretManager.secret_manager_service_available?}. + # + # ## About SecretManagerService + # + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * Secret + # * SecretVersion + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.secret_manager_service version: :v1, &block + require "google/cloud/secret_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::SecretManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SecretManager.const_get(package_name).const_get(:SecretManagerService) + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SecretManagerService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SecretManager.secret_manager_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SecretManagerService service, + # or if the versioned client gem needs an update to support the SecretManagerService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.secret_manager_service_available? version: :v1 + require "google/cloud/secret_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::SecretManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SecretManager.const_get package_name + return false unless service_module.const_defined? :SecretManagerService + service_module = service_module.const_get :SecretManagerService + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-secret_manager library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.secret_manager if block_given? + + ::Google::Cloud.configure.secret_manager + end + end + end +end + +helper_path = ::File.join __dir__, "secret_manager", "helpers.rb" +require "google/cloud/secret_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb new file mode 100644 index 000000000000..7ca62e39649f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.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! + + +module Google + module Cloud + module SecretManager + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb new file mode 100644 index 000000000000..9bf24e4ef2a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.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 "helper" +require "google/cloud/secret_manager" +require "gapic/common" +require "gapic/grpc" + +class Google::Cloud::SecretManager::ClientConstructionMinitest < 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_secret_manager_service_grpc + skip unless Google::Cloud::SecretManager.secret_manager_service_available? + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SecretManager.secret_manager_service do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SecretManager::V1::SecretManagerService::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb new file mode 100644 index 000000000000..7188a10c49e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.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 "helper" +require "google/cloud/secret_manager/version" + +class Google::Cloud::SecretManager::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::SecretManager::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.gitignore b/owl-bot-staging/google-cloud-secure_source_manager/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json new file mode 100644 index 000000000000..c96017f17418 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "securesourcemanager.googleapis.com", + "api_shortname": "securesourcemanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager/latest", + "distribution_name": "google-cloud-secure_source_manager", + "is_cloud": true, + "language": "ruby", + "name": "securesourcemanager", + "name_pretty": "Secure Source Manager API", + "product_documentation": "https://cloud.google.com/secure-source-manager/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.", + "ruby-cloud-product-url": "https://cloud.google.com/secure-source-manager/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml b/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml new file mode 100644 index 000000000000..39706a9e0bfe --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-secure_source_manager.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-secure_source_manager.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.toys.rb b/owl-bot-staging/google-cloud-secure_source_manager/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/.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-secure_source_manager/.yardopts b/owl-bot-staging/google-cloud-secure_source_manager/.yardopts new file mode 100644 index 000000000000..5c99ec81c960 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Secure Source Manager API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md new file mode 100644 index 000000000000..70e84a04d138 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-secure_source_manager 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-secure_source_manager 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/secure_source_manager" + +client = Google::Cloud::SecureSourceManager.secure_source_manager do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/secure_source_manager" + +Google::Cloud::SecureSourceManager.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::SecureSourceManager.secure_source_manager +``` + +### 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-secure_source_manager +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/secure_source_manager" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::SecureSourceManager.secure_source_manager +``` + +### 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-secure_source_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-secure_source_manager/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager/Gemfile new file mode 100644 index 000000000000..62aad3de0c1f --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-secure_source_manager-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-secure_source_manager.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md b/owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/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-secure_source_manager/README.md b/owl-bot-staging/google-cloud-secure_source_manager/README.md new file mode 100644 index 000000000000..e4ca64a63a6d --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Secure Source Manager API + +Regionally deployed, single-tenant managed source code repository hosted on Google Cloud. + +Regionally deployed, single-tenant managed source code repository hosted on Google Cloud. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-secure_source_manager-v*`. +The gem `google-cloud-secure_source_manager` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager/latest) +for this library, google-cloud-secure_source_manager, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-secure_source_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/secure-source-manager/docs/overview) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-secure_source_manager +``` + +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/securesourcemanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/secure_source_manager" + +client = Google::Cloud::SecureSourceManager.secure_source_manager +request = ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-secure_source_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-secure_source_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-secure_source_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-secure_source_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-secure_source_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-secure_source_manager/Rakefile b/owl-bot-staging/google-cloud-secure_source_manager/Rakefile new file mode 100644 index 000000000000..c7970accf7b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/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 = true +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-secure_source_manager 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/secure_source_manager/v1/secure_source_manager/credentials" + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::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-secure_source_manager 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-secure_source_manager 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-secure_source_manager 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-secure_source_manager gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-secure_source_manager" + header "google-cloud-secure_source_manager rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-secure_source_manager yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-secure_source_manager 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-secure_source_manager 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-secure_source_manager 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-secure_source_manager/google-cloud-secure_source_manager.gemspec b/owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec new file mode 100644 index 000000000000..8de41a0b590d --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/secure_source_manager/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-secure_source_manager" + gem.version = Google::Cloud::SecureSourceManager::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud." + gem.summary = "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-secure_source_manager-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb new file mode 100644 index 000000000000..268a417c2881 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secure_source_manager" unless defined? Google::Cloud::SecureSourceManager::VERSION diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb new file mode 100644 index 000000000000..486b73863305 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/secure_source_manager/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :secure_source_manager do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module SecureSourceManager + ## + # Create a new client object for SecureSourceManager. + # + # By default, this returns an instance of + # [Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest/Google-Cloud-SecureSourceManager-V1-SecureSourceManager-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SecureSourceManager service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SecureSourceManager service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SecureSourceManager.secure_source_manager_available?}. + # + # ## About SecureSourceManager + # + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.secure_source_manager version: :v1, transport: :grpc, &block + require "google/cloud/secure_source_manager/#{version.to_s.downcase}" + + package_name = Google::Cloud::SecureSourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SecureSourceManager.const_get(package_name).const_get(:SecureSourceManager) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SecureSourceManager service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SecureSourceManager.secure_source_manager}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SecureSourceManager service, + # or if the versioned client gem needs an update to support the SecureSourceManager service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.secure_source_manager_available? version: :v1, transport: :grpc + require "google/cloud/secure_source_manager/#{version.to_s.downcase}" + package_name = Google::Cloud::SecureSourceManager + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SecureSourceManager.const_get package_name + return false unless service_module.const_defined? :SecureSourceManager + service_module = service_module.const_get :SecureSourceManager + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-secure_source_manager library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.secure_source_manager if block_given? + + ::Google::Cloud.configure.secure_source_manager + end + end + end +end + +helper_path = ::File.join __dir__, "secure_source_manager", "helpers.rb" +require "google/cloud/secure_source_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb new file mode 100644 index 000000000000..3e29de4e1fc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.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! + + +module Google + module Cloud + module SecureSourceManager + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb new file mode 100644 index 000000000000..190212437d4c --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/secure_source_manager" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::SecureSourceManager::ClientConstructionMinitest < 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_secure_source_manager_grpc + skip unless Google::Cloud::SecureSourceManager.secure_source_manager_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SecureSourceManager.secure_source_manager transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client, client + end + end + + def test_secure_source_manager_rest + skip unless Google::Cloud::SecureSourceManager.secure_source_manager_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::SecureSourceManager.secure_source_manager transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb new file mode 100644 index 000000000000..bd800a9c364b --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.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 "helper" +require "google/cloud/secure_source_manager/version" + +class Google::Cloud::SecureSourceManager::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::SecureSourceManager::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-security-private_ca/.gitignore b/owl-bot-staging/google-cloud-security-private_ca/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json new file mode 100644 index 000000000000..2b91981ab57d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "privateca.googleapis.com", + "api_shortname": "privateca", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca/latest", + "distribution_name": "google-cloud-security-private_ca", + "is_cloud": true, + "language": "ruby", + "name": "privateca", + "name_pretty": "Certificate Authority Service API", + "product_documentation": "https://cloud.google.com/certificate-authority-service/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA).", + "ruby-cloud-env-prefix": "PRIVATE_CA", + "ruby-cloud-product-url": "https://cloud.google.com/certificate-authority-service/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml new file mode 100644 index 000000000000..7f896b67fed6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security-private_ca.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-security-private_ca.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/.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-security-private_ca/.yardopts b/owl-bot-staging/google-cloud-security-private_ca/.yardopts new file mode 100644 index 000000000000..f80be6dbfa0c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Certificate Authority Service API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md new file mode 100644 index 000000000000..21501331e8f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security-private_ca 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-security-private_ca 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/security/private_ca" + +client = Google::Cloud::Security::PrivateCA.certificate_authority_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security/private_ca" + +Google::Cloud::Security::PrivateCA.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Security::PrivateCA.certificate_authority_service +``` + +### 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-security-private_ca +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/security/private_ca" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Security::PrivateCA.certificate_authority_service +``` + +### 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-security-private_ca/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security-private_ca/Gemfile b/owl-bot-staging/google-cloud-security-private_ca/Gemfile new file mode 100644 index 000000000000..75f48ab4c72a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-security-private_ca-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security-private_ca.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security-private_ca/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/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-security-private_ca/README.md b/owl-bot-staging/google-cloud-security-private_ca/README.md new file mode 100644 index 000000000000..24a97fc1f067 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Certificate Authority Service API + +API Client library for the Certificate Authority Service API + +Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA). + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-security-private_ca-v*`. +The gem `google-cloud-security-private_ca` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca/latest) +for this library, google-cloud-security-private_ca, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-security-private_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-security-private_ca +``` + +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/privateca.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/security/private_ca" + +client = Google::Cloud::Security::PrivateCA.certificate_authority_service +request = ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new # (request fields as keyword arguments...) +response = client.create_certificate request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-security-private_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security-private_ca`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security-private_ca-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-security-private_ca`. +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-security-private_ca-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-security-private_ca/Rakefile b/owl-bot-staging/google-cloud-security-private_ca/Rakefile new file mode 100644 index 000000000000..9d47be393410 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/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 = true +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-security-private_ca acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["PRIVATE_CA_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["PRIVATE_CA_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["PRIVATE_CA_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 PRIVATE_CA_TEST_PROJECT=test123 PRIVATE_CA_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["PRIVATE_CA_PROJECT"] = project + ENV["PRIVATE_CA_TEST_PROJECT"] = project + ENV["PRIVATE_CA_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-security-private_ca 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-security-private_ca 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-security-private_ca 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-security-private_ca gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security-private_ca" + header "google-cloud-security-private_ca rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security-private_ca yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security-private_ca 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-security-private_ca 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-security-private_ca 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-security-private_ca/google-cloud-security-private_ca.gemspec b/owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec new file mode 100644 index 000000000000..18c6739342bc --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security/private_ca/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security-private_ca" + gem.version = Google::Cloud::Security::PrivateCA::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA)." + gem.summary = "API Client library for the Certificate Authority Service 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-security-private_ca-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb new file mode 100644 index 000000000000..dfcf801e91e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/private_ca" unless defined? Google::Cloud::Security::PrivateCA::VERSION diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb new file mode 100644 index 000000000000..9e4201a2067f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/security/private_ca/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :security_private_ca do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Security + module PrivateCA + ## + # Create a new client object for CertificateAuthorityService. + # + # By default, this returns an instance of + # [Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateAuthorityService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CertificateAuthorityService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CertificateAuthorityService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Security::PrivateCA.certificate_authority_service_available?}. + # + # ## About CertificateAuthorityService + # + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.certificate_authority_service version: :v1, transport: :grpc, &block + require "google/cloud/security/private_ca/#{version.to_s.downcase}" + + package_name = Google::Cloud::Security::PrivateCA + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Security::PrivateCA.const_get(package_name).const_get(:CertificateAuthorityService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CertificateAuthorityService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Security::PrivateCA.certificate_authority_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CertificateAuthorityService service, + # or if the versioned client gem needs an update to support the CertificateAuthorityService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.certificate_authority_service_available? version: :v1, transport: :grpc + require "google/cloud/security/private_ca/#{version.to_s.downcase}" + package_name = Google::Cloud::Security::PrivateCA + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Security::PrivateCA.const_get package_name + return false unless service_module.const_defined? :CertificateAuthorityService + service_module = service_module.const_get :CertificateAuthorityService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-security-private_ca library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.security_private_ca if block_given? + + ::Google::Cloud.configure.security_private_ca + end + end + end + end +end + +helper_path = ::File.join __dir__, "private_ca", "helpers.rb" +require "google/cloud/security/private_ca/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb new file mode 100644 index 000000000000..710d0f02b785 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/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 Security + module PrivateCA + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb new file mode 100644 index 000000000000..713e8a57dfed --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/security/private_ca" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Security::PrivateCA::ClientConstructionMinitest < 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_certificate_authority_service_grpc + skip unless Google::Cloud::Security::PrivateCA.certificate_authority_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Security::PrivateCA.certificate_authority_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client, client + end + end + + def test_certificate_authority_service_rest + skip unless Google::Cloud::Security::PrivateCA.certificate_authority_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Security::PrivateCA.certificate_authority_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb new file mode 100644 index 000000000000..155f19753fba --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.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 "helper" +require "google/cloud/security/private_ca/version" + +class Google::Cloud::Security::PrivateCA::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Security::PrivateCA::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-security-public_ca/.gitignore b/owl-bot-staging/google-cloud-security-public_ca/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json b/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json new file mode 100644 index 000000000000..3aa27a366c8d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "publicca.googleapis.com", + "api_shortname": "publicca", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca/latest", + "distribution_name": "google-cloud-security-public_ca", + "is_cloud": true, + "language": "ruby", + "name": "publicca", + "name_pretty": "Public Certificate Authority API", + "product_documentation": "https://cloud.google.com/certificate-manager/docs/public-ca/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic.", + "ruby-cloud-product-url": "https://cloud.google.com/certificate-manager/docs/public-ca/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml b/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml new file mode 100644 index 000000000000..011570c346df --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security-public_ca.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-security-public_ca.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security-public_ca/.toys.rb b/owl-bot-staging/google-cloud-security-public_ca/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/.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-security-public_ca/.yardopts b/owl-bot-staging/google-cloud-security-public_ca/.yardopts new file mode 100644 index 000000000000..21b229b9489f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Public Certificate Authority API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md new file mode 100644 index 000000000000..8076eb88c352 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security-public_ca 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-security-public_ca 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/security/public_ca" + +client = Google::Cloud::Security::PublicCA.public_certificate_authority_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security/public_ca" + +Google::Cloud::Security::PublicCA.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Security::PublicCA.public_certificate_authority_service +``` + +### 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-security-public_ca +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/security/public_ca" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Security::PublicCA.public_certificate_authority_service +``` + +### 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-security-public_ca/CHANGELOG.md b/owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security-public_ca/Gemfile b/owl-bot-staging/google-cloud-security-public_ca/Gemfile new file mode 100644 index 000000000000..b0f36d13850e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-security-public_ca-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security-public_ca.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security-public_ca/LICENSE.md b/owl-bot-staging/google-cloud-security-public_ca/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/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-security-public_ca/README.md b/owl-bot-staging/google-cloud-security-public_ca/README.md new file mode 100644 index 000000000000..6667cc1e58c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Public Certificate Authority API + +API Client library for the Public Certificate Authority API + +Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-security-public_ca-v*`. +The gem `google-cloud-security-public_ca` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca/latest) +for this library, google-cloud-security-public_ca, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-security-public_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/certificate-manager/docs/public-ca/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-security-public_ca +``` + +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/publicca.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/security/public_ca" + +client = Google::Cloud::Security::PublicCA.public_certificate_authority_service +request = ::Google::Cloud::Security::PublicCA::V1::CreateExternalAccountKeyRequest.new # (request fields as keyword arguments...) +response = client.create_external_account_key request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-security-public_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security-public_ca`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security-public_ca-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-security-public_ca`. +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-security-public_ca-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-security-public_ca/Rakefile b/owl-bot-staging/google-cloud-security-public_ca/Rakefile new file mode 100644 index 000000000000..dd0c72029fb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/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 = true +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-security-public_ca 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/security/public_ca/v1/public_certificate_authority_service/credentials" + ::Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::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-security-public_ca 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-security-public_ca 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-security-public_ca 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-security-public_ca gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security-public_ca" + header "google-cloud-security-public_ca rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security-public_ca yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security-public_ca 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-security-public_ca 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-security-public_ca 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-security-public_ca/google-cloud-security-public_ca.gemspec b/owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec new file mode 100644 index 000000000000..1cdf012d758e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security/public_ca/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security-public_ca" + gem.version = Google::Cloud::Security::PublicCA::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic." + gem.summary = "API Client library for the Public Certificate Authority 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-security-public_ca-v1", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb new file mode 100644 index 000000000000..02d86471dd61 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/public_ca" unless defined? Google::Cloud::Security::PublicCA::VERSION diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb new file mode 100644 index 000000000000..e74a9eb7a405 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/security/public_ca/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :security_public_ca do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Security + module PublicCA + ## + # Create a new client object for PublicCertificateAuthorityService. + # + # By default, this returns an instance of + # [Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest/Google-Cloud-Security-PublicCA-V1-PublicCertificateAuthorityService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the PublicCertificateAuthorityService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the PublicCertificateAuthorityService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Security::PublicCA.public_certificate_authority_service_available?}. + # + # ## About PublicCertificateAuthorityService + # + # Manages the resources required for ACME [external account + # binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for + # the public certificate authority service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.public_certificate_authority_service version: :v1, transport: :grpc, &block + require "google/cloud/security/public_ca/#{version.to_s.downcase}" + + package_name = Google::Cloud::Security::PublicCA + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Security::PublicCA.const_get(package_name).const_get(:PublicCertificateAuthorityService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the PublicCertificateAuthorityService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Security::PublicCA.public_certificate_authority_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the PublicCertificateAuthorityService service, + # or if the versioned client gem needs an update to support the PublicCertificateAuthorityService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.public_certificate_authority_service_available? version: :v1, transport: :grpc + require "google/cloud/security/public_ca/#{version.to_s.downcase}" + package_name = Google::Cloud::Security::PublicCA + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Security::PublicCA.const_get package_name + return false unless service_module.const_defined? :PublicCertificateAuthorityService + service_module = service_module.const_get :PublicCertificateAuthorityService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-security-public_ca library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.security_public_ca if block_given? + + ::Google::Cloud.configure.security_public_ca + end + end + end + end +end + +helper_path = ::File.join __dir__, "public_ca", "helpers.rb" +require "google/cloud/security/public_ca/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb new file mode 100644 index 000000000000..8ed789ab67bd --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/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 Security + module PublicCA + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb new file mode 100644 index 000000000000..5362979abaf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/security/public_ca" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Security::PublicCA::ClientConstructionMinitest < 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_public_certificate_authority_service_grpc + skip unless Google::Cloud::Security::PublicCA.public_certificate_authority_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Security::PublicCA.public_certificate_authority_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Client, client + end + end + + def test_public_certificate_authority_service_rest + skip unless Google::Cloud::Security::PublicCA.public_certificate_authority_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Security::PublicCA.public_certificate_authority_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb new file mode 100644 index 000000000000..90b9af92bc5c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.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 "helper" +require "google/cloud/security/public_ca/version" + +class Google::Cloud::Security::PublicCA::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Security::PublicCA::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb b/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-security_center/.gitignore b/owl-bot-staging/google-cloud-security_center/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center/.repo-metadata.json new file mode 100644 index 000000000000..3ddbc21b11d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "securitycenter.googleapis.com", + "api_shortname": "securitycenter", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center/latest", + "distribution_name": "google-cloud-security_center", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Security Command Center API", + "product_documentation": "https://cloud.google.com/security-command-center", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", + "ruby-cloud-env-prefix": "SECURITY_CENTER", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-security_center/.rubocop.yml b/owl-bot-staging/google-cloud-security_center/.rubocop.yml new file mode 100644 index 000000000000..c8a023b8c970 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-security_center.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security_center/.toys.rb b/owl-bot-staging/google-cloud-security_center/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/.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-security_center/.yardopts b/owl-bot-staging/google-cloud-security_center/.yardopts new file mode 100644 index 000000000000..c91fb9cbddc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Security Command Center API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md new file mode 100644 index 000000000000..95e72c13be42 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center 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-security_center 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/security_center" + +client = Google::Cloud::SecurityCenter.security_center do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center" + +Google::Cloud::SecurityCenter.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::SecurityCenter.security_center +``` + +### 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-security_center +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/security_center" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::SecurityCenter.security_center +``` + +### 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-security_center/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center/Gemfile b/owl-bot-staging/google-cloud-security_center/Gemfile new file mode 100644 index 000000000000..9ea5b10b9d72 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-security_center-v1", "google-cloud-security_center-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security_center.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center/LICENSE.md b/owl-bot-staging/google-cloud-security_center/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/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-security_center/README.md b/owl-bot-staging/google-cloud-security_center/README.md new file mode 100644 index 000000000000..df1ec92c5ce5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/README.md @@ -0,0 +1,144 @@ +# Ruby Client for the Security Command Center API + +API Client library for the Security Command Center API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-security_center-v*`. +The gem `google-cloud-security_center` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center/latest) +for this library, google-cloud-security_center, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-security_center-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest), +[google-cloud-security_center-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest). + +See also the [Product Documentation](https://cloud.google.com/security-command-center) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-security_center +``` + +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/securitycenter.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/security_center" + +client = Google::Cloud::SecurityCenter.security_center +request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) +response = client.batch_create_resource_value_configs request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-security_center-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest), +[google-cloud-security_center-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security_center`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security_center-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-security_center`. +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-security_center-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-security_center/Rakefile b/owl-bot-staging/google-cloud-security_center/Rakefile new file mode 100644 index 000000000000..84bd60853024 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/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 = true +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-security_center acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SECURITY_CENTER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SECURITY_CENTER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SECURITY_CENTER_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 SECURITY_CENTER_TEST_PROJECT=test123 SECURITY_CENTER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/security_center/v2/security_center/credentials" + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SECURITY_CENTER_PROJECT"] = project + ENV["SECURITY_CENTER_TEST_PROJECT"] = project + ENV["SECURITY_CENTER_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-security_center 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-security_center 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-security_center 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-security_center gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center" + header "google-cloud-security_center rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center 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-security_center 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-security_center 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-security_center/google-cloud-security_center.gemspec b/owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec new file mode 100644 index 000000000000..bc6a40b370d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center" + gem.version = Google::Cloud::SecurityCenter::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Security Command Center API provides access to temporal views of assets and findings within an organization." + gem.summary = "API Client library for the Security Command Center 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-security_center-v1", "~> 1.0" + gem.add_dependency "google-cloud-security_center-v2", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb b/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb new file mode 100644 index 000000000000..fe6260d8dad8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center" unless defined? Google::Cloud::SecurityCenter::VERSION diff --git a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb new file mode 100644 index 000000000000..9b56b412b55e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/security_center/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :security_center do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module SecurityCenter + ## + # Create a new client object for SecurityCenter. + # + # By default, this returns an instance of + # [Google::Cloud::SecurityCenter::V2::SecurityCenter::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-SecurityCenter-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SecurityCenter service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SecurityCenter service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SecurityCenter.security_center_available?}. + # + # ## About SecurityCenter + # + # V2 APIs for Security Center service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.security_center version: :v2, transport: :grpc, &block + require "google/cloud/security_center/#{version.to_s.downcase}" + + package_name = Google::Cloud::SecurityCenter + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SecurityCenter.const_get(package_name).const_get(:SecurityCenter) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SecurityCenter service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SecurityCenter.security_center}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SecurityCenter service, + # or if the versioned client gem needs an update to support the SecurityCenter service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.security_center_available? version: :v2, transport: :grpc + require "google/cloud/security_center/#{version.to_s.downcase}" + package_name = Google::Cloud::SecurityCenter + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SecurityCenter.const_get package_name + return false unless service_module.const_defined? :SecurityCenter + service_module = service_module.const_get :SecurityCenter + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-security_center library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.security_center if block_given? + + ::Google::Cloud.configure.security_center + end + end + end +end + +helper_path = ::File.join __dir__, "security_center", "helpers.rb" +require "google/cloud/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb new file mode 100644 index 000000000000..74921f6d129f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.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! + + +module Google + module Cloud + module SecurityCenter + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb new file mode 100644 index 000000000000..8c3f1e06dfe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/security_center" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::SecurityCenter::ClientConstructionMinitest < 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_security_center_grpc + skip unless Google::Cloud::SecurityCenter.security_center_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SecurityCenter.security_center transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client, client + end + end + + def test_security_center_rest + skip unless Google::Cloud::SecurityCenter.security_center_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::SecurityCenter.security_center transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb new file mode 100644 index 000000000000..437d0c72c376 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.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 "helper" +require "google/cloud/security_center/version" + +class Google::Cloud::SecurityCenter::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::SecurityCenter::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-security_center/test/helper.rb b/owl-bot-staging/google-cloud-security_center/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-security_center_management/.gitignore b/owl-bot-staging/google-cloud-security_center_management/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json new file mode 100644 index 000000000000..6d4ca5e755c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "securitycentermanagement.googleapis.com", + "api_shortname": "securitycentermanagement", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management/latest", + "distribution_name": "google-cloud-security_center_management", + "is_cloud": true, + "language": "ruby", + "name": "securitycentermanagement", + "name_pretty": "Security Command Center Management API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center.", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml b/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml new file mode 100644 index 000000000000..1a767b2ca887 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center_management.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-security_center_management.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security_center_management/.toys.rb b/owl-bot-staging/google-cloud-security_center_management/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/.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-security_center_management/.yardopts b/owl-bot-staging/google-cloud-security_center_management/.yardopts new file mode 100644 index 000000000000..716be9fa4724 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Security Command Center Management API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md new file mode 100644 index 000000000000..438c3f974b75 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center_management 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-security_center_management 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/security_center_management" + +client = Google::Cloud::SecurityCenterManagement.security_center_management do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center_management" + +Google::Cloud::SecurityCenterManagement.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::SecurityCenterManagement.security_center_management +``` + +### 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-security_center_management +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/security_center_management" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::SecurityCenterManagement.security_center_management +``` + +### 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-security_center_management/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center_management/Gemfile b/owl-bot-staging/google-cloud-security_center_management/Gemfile new file mode 100644 index 000000000000..4181426cc4c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-security_center_management-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security_center_management.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center_management/LICENSE.md b/owl-bot-staging/google-cloud-security_center_management/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/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-security_center_management/README.md b/owl-bot-staging/google-cloud-security_center_management/README.md new file mode 100644 index 000000000000..1681c13bcbf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Security Command Center Management API + +Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center. + +Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-security_center_management-v*`. +The gem `google-cloud-security_center_management` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management/latest) +for this library, google-cloud-security_center_management, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-security_center_management-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-security_center_management +``` + +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/securitycentermanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/security_center_management" + +client = Google::Cloud::SecurityCenterManagement.security_center_management +request = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new # (request fields as keyword arguments...) +response = client.list_effective_security_health_analytics_custom_modules request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-security_center_management-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security_center_management`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security_center_management-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-security_center_management`. +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-security_center_management-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-security_center_management/Rakefile b/owl-bot-staging/google-cloud-security_center_management/Rakefile new file mode 100644 index 000000000000..ae4211523697 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/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 = true +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-security_center_management 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/security_center_management/v1/security_center_management/credentials" + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::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-security_center_management 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-security_center_management 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-security_center_management 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-security_center_management gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center_management" + header "google-cloud-security_center_management rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center_management yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center_management 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-security_center_management 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-security_center_management 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-security_center_management/google-cloud-security_center_management.gemspec b/owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec new file mode 100644 index 000000000000..e9ce96242ddd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center_management/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center_management" + gem.version = Google::Cloud::SecurityCenterManagement::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center." + gem.summary = "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center." + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-security_center_management-v1", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb new file mode 100644 index 000000000000..64a6361608f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center_management" unless defined? Google::Cloud::SecurityCenterManagement::VERSION diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb new file mode 100644 index 000000000000..8c0d3abc31df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/security_center_management/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :security_center_management do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module SecurityCenterManagement + ## + # Create a new client object for SecurityCenterManagement. + # + # By default, this returns an instance of + # [Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest/Google-Cloud-SecurityCenterManagement-V1-SecurityCenterManagement-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the SecurityCenterManagement service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the SecurityCenterManagement service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::SecurityCenterManagement.security_center_management_available?}. + # + # ## About SecurityCenterManagement + # + # Service describing handlers for resources + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.security_center_management version: :v1, transport: :grpc, &block + require "google/cloud/security_center_management/#{version.to_s.downcase}" + + package_name = Google::Cloud::SecurityCenterManagement + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::SecurityCenterManagement.const_get(package_name).const_get(:SecurityCenterManagement) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the SecurityCenterManagement service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::SecurityCenterManagement.security_center_management}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the SecurityCenterManagement service, + # or if the versioned client gem needs an update to support the SecurityCenterManagement service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.security_center_management_available? version: :v1, transport: :grpc + require "google/cloud/security_center_management/#{version.to_s.downcase}" + package_name = Google::Cloud::SecurityCenterManagement + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::SecurityCenterManagement.const_get package_name + return false unless service_module.const_defined? :SecurityCenterManagement + service_module = service_module.const_get :SecurityCenterManagement + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-security_center_management library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.security_center_management if block_given? + + ::Google::Cloud.configure.security_center_management + end + end + end +end + +helper_path = ::File.join __dir__, "security_center_management", "helpers.rb" +require "google/cloud/security_center_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb new file mode 100644 index 000000000000..2c8ac752f525 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.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! + + +module Google + module Cloud + module SecurityCenterManagement + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb new file mode 100644 index 000000000000..0b41e9e51f38 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/security_center_management" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::SecurityCenterManagement::ClientConstructionMinitest < 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_security_center_management_grpc + skip unless Google::Cloud::SecurityCenterManagement.security_center_management_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::SecurityCenterManagement.security_center_management transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client, client + end + end + + def test_security_center_management_rest + skip unless Google::Cloud::SecurityCenterManagement.security_center_management_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::SecurityCenterManagement.security_center_management transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb new file mode 100644 index 000000000000..0e5abb53009e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.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 "helper" +require "google/cloud/security_center_management/version" + +class Google::Cloud::SecurityCenterManagement::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::SecurityCenterManagement::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/helper.rb b/owl-bot-staging/google-cloud-security_center_management/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-service_control/.gitignore b/owl-bot-staging/google-cloud-service_control/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-service_control/.repo-metadata.json b/owl-bot-staging/google-cloud-service_control/.repo-metadata.json new file mode 100644 index 000000000000..704c7c42ac47 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "servicecontrol.googleapis.com", + "api_shortname": "servicecontrol", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_control/latest", + "distribution_name": "google-cloud-service_control", + "is_cloud": true, + "language": "ruby", + "name": "servicecontrol", + "name_pretty": "Service Control API API", + "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks.", + "ruby-cloud-env-prefix": "SERVICE_CONTROL", + "ruby-cloud-product-url": "https://cloud.google.com/service-infrastructure/docs/overview/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-service_control/.rubocop.yml b/owl-bot-staging/google-cloud-service_control/.rubocop.yml new file mode 100644 index 000000000000..c65590c8bd8f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_control.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-service_control.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-service_control/.toys.rb b/owl-bot-staging/google-cloud-service_control/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/.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-service_control/.yardopts b/owl-bot-staging/google-cloud-service_control/.yardopts new file mode 100644 index 000000000000..a184c4dff235 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Service Control API API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md new file mode 100644 index 000000000000..594950fc3fe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_control 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-service_control 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/service_control" + +client = Google::Cloud::ServiceControl.quota_controller do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_control" + +Google::Cloud::ServiceControl.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::ServiceControl.quota_controller +``` + +### 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-service_control +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/service_control" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::ServiceControl.quota_controller +``` + +### 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-service_control/CHANGELOG.md b/owl-bot-staging/google-cloud-service_control/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_control/Gemfile b/owl-bot-staging/google-cloud-service_control/Gemfile new file mode 100644 index 000000000000..7c9d9fbef522 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/Gemfile @@ -0,0 +1,32 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-service_control-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-service_control.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-service_control/LICENSE.md b/owl-bot-staging/google-cloud-service_control/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/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-service_control/README.md b/owl-bot-staging/google-cloud-service_control/README.md new file mode 100644 index 000000000000..4062628d293a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Service Control API API + +API Client library for the Service Control API API + +The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-service_control-v*`. +The gem `google-cloud-service_control` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control/latest) +for this library, google-cloud-service_control, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-service_control-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-service_control +``` + +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/servicecontrol.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/service_control" + +client = Google::Cloud::ServiceControl.quota_controller +request = ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new # (request fields as keyword arguments...) +response = client.allocate_quota request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-service_control-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-service_control`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-service_control-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-service_control`. +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-service_control-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-service_control/Rakefile b/owl-bot-staging/google-cloud-service_control/Rakefile new file mode 100644 index 000000000000..71014908742d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/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 = true +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-service_control acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SERVICE_CONTROL_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SERVICE_CONTROL_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SERVICE_CONTROL_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 SERVICE_CONTROL_TEST_PROJECT=test123 SERVICE_CONTROL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/service_control/v1/quota_controller/credentials" + ::Google::Cloud::ServiceControl::V1::QuotaController::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SERVICE_CONTROL_PROJECT"] = project + ENV["SERVICE_CONTROL_TEST_PROJECT"] = project + ENV["SERVICE_CONTROL_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-service_control 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-service_control 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-service_control 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-service_control gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_control" + header "google-cloud-service_control rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_control yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_control 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-service_control 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-service_control 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-service_control/google-cloud-service_control.gemspec b/owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec new file mode 100644 index 000000000000..27cf1bb4a576 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_control/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_control" + gem.version = Google::Cloud::ServiceControl::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks." + gem.summary = "API Client library for the Service Control API 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-service_control-v1", ">= 0.9", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb b/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb new file mode 100644 index 000000000000..dd4b9fda45e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_control" unless defined? Google::Cloud::ServiceControl::VERSION diff --git a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb new file mode 100644 index 000000000000..aab78a11e486 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb @@ -0,0 +1,234 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/service_control/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :service_control do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module ServiceControl + ## + # Create a new client object for QuotaController. + # + # By default, this returns an instance of + # [Google::Cloud::ServiceControl::V1::QuotaController::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-QuotaController-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the QuotaController service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the QuotaController service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ServiceControl.quota_controller_available?}. + # + # ## About QuotaController + # + # [Google Quota Control API](https://cloud.google.com/service-control/overview) + # + # Allows clients to allocate and release quota against a [managed + # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService). + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.quota_controller version: :v1, transport: :grpc, &block + require "google/cloud/service_control/#{version.to_s.downcase}" + + package_name = Google::Cloud::ServiceControl + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ServiceControl.const_get(package_name).const_get(:QuotaController) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the QuotaController service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ServiceControl.quota_controller}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the QuotaController service, + # or if the versioned client gem needs an update to support the QuotaController service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.quota_controller_available? version: :v1, transport: :grpc + require "google/cloud/service_control/#{version.to_s.downcase}" + package_name = Google::Cloud::ServiceControl + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ServiceControl.const_get package_name + return false unless service_module.const_defined? :QuotaController + service_module = service_module.const_get :QuotaController + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for ServiceController. + # + # By default, this returns an instance of + # [Google::Cloud::ServiceControl::V1::ServiceController::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-ServiceController-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the ServiceController service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the ServiceController service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::ServiceControl.service_controller_available?}. + # + # ## About ServiceController + # + # [Google Service Control + # API](https://cloud.google.com/service-control/overview) + # + # Lets clients check and report operations against a [managed + # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService). + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.service_controller version: :v1, transport: :grpc, &block + require "google/cloud/service_control/#{version.to_s.downcase}" + + package_name = Google::Cloud::ServiceControl + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::ServiceControl.const_get(package_name).const_get(:ServiceController) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the ServiceController service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::ServiceControl.service_controller}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the ServiceController service, + # or if the versioned client gem needs an update to support the ServiceController service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.service_controller_available? version: :v1, transport: :grpc + require "google/cloud/service_control/#{version.to_s.downcase}" + package_name = Google::Cloud::ServiceControl + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::ServiceControl.const_get package_name + return false unless service_module.const_defined? :ServiceController + service_module = service_module.const_get :ServiceController + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-service_control library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.service_control if block_given? + + ::Google::Cloud.configure.service_control + end + end + end +end + +helper_path = ::File.join __dir__, "service_control", "helpers.rb" +require "google/cloud/service_control/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb new file mode 100644 index 000000000000..1dc46c9b882b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.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! + + +module Google + module Cloud + module ServiceControl + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb new file mode 100644 index 000000000000..6c5e27771a35 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.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! + +require "helper" +require "google/cloud/service_control" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::ServiceControl::ClientConstructionMinitest < 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_quota_controller_grpc + skip unless Google::Cloud::ServiceControl.quota_controller_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ServiceControl.quota_controller transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ServiceControl::V1::QuotaController::Client, client + end + end + + def test_quota_controller_rest + skip unless Google::Cloud::ServiceControl.quota_controller_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ServiceControl.quota_controller transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client, client + end + end + + def test_service_controller_grpc + skip unless Google::Cloud::ServiceControl.service_controller_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::ServiceControl.service_controller transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::ServiceControl::V1::ServiceController::Client, client + end + end + + def test_service_controller_rest + skip unless Google::Cloud::ServiceControl.service_controller_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::ServiceControl.service_controller transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb new file mode 100644 index 000000000000..6b1cc8ae1ce3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.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 "helper" +require "google/cloud/service_control/version" + +class Google::Cloud::ServiceControl::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::ServiceControl::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-service_control/test/helper.rb b/owl-bot-staging/google-cloud-service_control/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From af456eb5a193c37df4f3422fe810f2f2df8a7c08 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 1 Aug 2026 03:04:59 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 +- google-cloud-product_registry/Gemfile | 2 +- google-cloud-profiler/.owlbot-manifest.json | 3 +- google-cloud-profiler/.toys.rb | 2 +- google-cloud-profiler/Gemfile | 2 +- google-cloud-profiler/Rakefile | 2 +- .../lib/google-cloud-profiler.rb | 2 +- .../lib/google/cloud/profiler.rb | 2 +- .../test/google/cloud/profiler/client_test.rb | 2 +- .../google/cloud/profiler/version_test.rb | 2 +- google-cloud-profiler/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Gemfile | 2 +- .../Rakefile | 2 +- ...google-cloud-rapid_migration_assessment.rb | 2 +- .../cloud/rapid_migration_assessment.rb | 2 +- .../rapid_migration_assessment/client_test.rb | 2 +- .../version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-recaptcha_enterprise/.toys.rb | 2 +- google-cloud-recaptcha_enterprise/Gemfile | 2 +- google-cloud-recaptcha_enterprise/Rakefile | 2 +- .../lib/google-cloud-recaptcha_enterprise.rb | 2 +- .../lib/google/cloud/recaptcha_enterprise.rb | 2 +- .../cloud/recaptcha_enterprise/client_test.rb | 2 +- .../recaptcha_enterprise/version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-recommendation_engine/.toys.rb | 2 +- google-cloud-recommendation_engine/Gemfile | 2 +- google-cloud-recommendation_engine/Rakefile | 2 +- .../lib/google-cloud-recommendation_engine.rb | 2 +- .../lib/google/cloud/recommendation_engine.rb | 2 +- .../recommendation_engine/client_test.rb | 2 +- .../recommendation_engine/version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-recommender/.toys.rb | 2 +- google-cloud-recommender/Gemfile | 2 +- google-cloud-recommender/Rakefile | 2 +- .../lib/google-cloud-recommender.rb | 2 +- .../lib/google/cloud/recommender.rb | 2 +- .../google/cloud/recommender/client_test.rb | 2 +- .../google/cloud/recommender/version_test.rb | 2 +- google-cloud-recommender/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-redis-cluster/.toys.rb | 2 +- google-cloud-redis-cluster/Gemfile | 2 +- google-cloud-redis-cluster/Rakefile | 2 +- .../lib/google-cloud-redis-cluster.rb | 2 +- .../lib/google/cloud/redis/cluster.rb | 2 +- .../google/cloud/redis/cluster/client_test.rb | 2 +- .../cloud/redis/cluster/version_test.rb | 2 +- google-cloud-redis-cluster/test/helper.rb | 2 +- google-cloud-redis/.owlbot-manifest.json | 1 + google-cloud-redis/.toys.rb | 2 +- google-cloud-redis/Gemfile | 2 +- google-cloud-redis/Rakefile | 2 +- google-cloud-redis/lib/google-cloud-redis.rb | 2 +- google-cloud-redis/lib/google/cloud/redis.rb | 2 +- .../test/google/cloud/redis/client_test.rb | 2 +- .../test/google/cloud/redis/version_test.rb | 2 +- google-cloud-redis/test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-resource_manager/.toys.rb | 2 +- google-cloud-resource_manager/Gemfile | 2 +- google-cloud-resource_manager/Rakefile | 2 +- .../lib/google-cloud-resource_manager.rb | 2 +- .../lib/google/cloud/resource_manager.rb | 2 +- .../cloud/resource_manager/client_test.rb | 2 +- .../cloud/resource_manager/version_test.rb | 2 +- google-cloud-resource_manager/test/helper.rb | 2 +- google-cloud-retail/.owlbot-manifest.json | 3 +- google-cloud-retail/.toys.rb | 2 +- google-cloud-retail/Gemfile | 2 +- google-cloud-retail/Rakefile | 2 +- .../lib/google-cloud-retail.rb | 2 +- .../lib/google/cloud/retail.rb | 2 +- .../test/google/cloud/retail/client_test.rb | 2 +- .../test/google/cloud/retail/version_test.rb | 2 +- google-cloud-retail/test/helper.rb | 2 +- google-cloud-run-client/.owlbot-manifest.json | 1 + google-cloud-run-client/.toys.rb | 2 +- google-cloud-run-client/Gemfile | 2 +- google-cloud-run-client/Rakefile | 2 +- .../lib/google-cloud-run-client.rb | 2 +- .../lib/google/cloud/run.rb | 2 +- .../test/google/cloud/run/client_test.rb | 2 +- .../test/google/cloud/run/version_test.rb | 2 +- google-cloud-run-client/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Gemfile | 2 +- .../Rakefile | 2 +- ...e-cloud-saas_platform-saas_service_mgmt.rb | 2 +- .../cloud/saas_platform/saas_service_mgmt.rb | 2 +- .../saas_service_mgmt/client_test.rb | 2 +- .../saas_service_mgmt/version_test.rb | 2 +- .../test/helper.rb | 2 +- google-cloud-scheduler/.owlbot-manifest.json | 1 + google-cloud-scheduler/.toys.rb | 2 +- google-cloud-scheduler/Gemfile | 2 +- google-cloud-scheduler/Rakefile | 2 +- .../lib/google-cloud-scheduler.rb | 2 +- .../lib/google/cloud/scheduler.rb | 2 +- .../google/cloud/scheduler/client_test.rb | 2 +- .../google/cloud/scheduler/version_test.rb | 2 +- google-cloud-scheduler/test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-secret_manager/.toys.rb | 2 +- google-cloud-secret_manager/Gemfile | 2 +- google-cloud-secret_manager/Rakefile | 2 +- .../lib/google-cloud-secret_manager.rb | 2 +- .../lib/google/cloud/secret_manager.rb | 2 +- .../cloud/secret_manager/client_test.rb | 2 +- .../cloud/secret_manager/version_test.rb | 2 +- google-cloud-secret_manager/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-secure_source_manager/.toys.rb | 2 +- google-cloud-secure_source_manager/Gemfile | 2 +- google-cloud-secure_source_manager/Rakefile | 2 +- .../lib/google-cloud-secure_source_manager.rb | 2 +- .../lib/google/cloud/secure_source_manager.rb | 2 +- .../secure_source_manager/client_test.rb | 2 +- .../secure_source_manager/version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-security-private_ca/.toys.rb | 2 +- google-cloud-security-private_ca/Gemfile | 2 +- google-cloud-security-private_ca/Rakefile | 2 +- .../lib/google-cloud-security-private_ca.rb | 2 +- .../lib/google/cloud/security/private_ca.rb | 2 +- .../cloud/security/private_ca/client_test.rb | 2 +- .../cloud/security/private_ca/version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-security-public_ca/.toys.rb | 2 +- google-cloud-security-public_ca/Gemfile | 2 +- google-cloud-security-public_ca/Rakefile | 2 +- .../lib/google-cloud-security-public_ca.rb | 2 +- .../lib/google/cloud/security/public_ca.rb | 2 +- .../cloud/security/public_ca/client_test.rb | 2 +- .../cloud/security/public_ca/version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-security_center/.toys.rb | 2 +- google-cloud-security_center/Gemfile | 2 +- google-cloud-security_center/Rakefile | 2 +- .../lib/google-cloud-security_center.rb | 2 +- .../lib/google/cloud/security_center.rb | 2 +- .../cloud/security_center/client_test.rb | 2 +- .../cloud/security_center/version_test.rb | 2 +- google-cloud-security_center/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Gemfile | 2 +- .../Rakefile | 2 +- ...google-cloud-security_center_management.rb | 2 +- .../cloud/security_center_management.rb | 2 +- .../security_center_management/client_test.rb | 2 +- .../version_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-service_control/.toys.rb | 2 +- google-cloud-service_control/Gemfile | 2 +- google-cloud-service_control/Rakefile | 2 +- .../lib/google-cloud-service_control.rb | 2 +- .../lib/google/cloud/service_control.rb | 2 +- .../cloud/service_control/client_test.rb | 2 +- .../cloud/service_control/version_test.rb | 2 +- google-cloud-service_control/test/helper.rb | 2 +- .../google-cloud-product_registry/.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../google-cloud-product_registry/.toys.rb | 28 - .../google-cloud-product_registry/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../google-cloud-product_registry/Gemfile | 32 - .../google-cloud-product_registry/LICENSE.md | 201 ---- .../google-cloud-product_registry/README.md | 141 --- .../google-cloud-product_registry/Rakefile | 169 ---- .../google-cloud-product_registry.gemspec | 27 - .../lib/google-cloud-product_registry.rb | 19 - .../lib/google/cloud/product_registry.rb | 158 --- .../google/cloud/product_registry/version.rb | 26 - .../cloud/product_registry/client_test.rb | 64 -- .../cloud/product_registry/version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-profiler/.gitignore | 20 - .../google-cloud-profiler/.repo-metadata.json | 18 - .../google-cloud-profiler/.rubocop.yml | 39 - .../google-cloud-profiler/.toys.rb | 28 - .../google-cloud-profiler/.yardopts | 11 - .../google-cloud-profiler/AUTHENTICATION.md | 122 --- .../google-cloud-profiler/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-profiler/Gemfile | 32 - .../google-cloud-profiler/LICENSE.md | 201 ---- .../google-cloud-profiler/README.md | 142 --- .../google-cloud-profiler/Rakefile | 169 ---- .../google-cloud-profiler.gemspec | 27 - .../lib/google-cloud-profiler.rb | 19 - .../lib/google/cloud/profiler.rb | 232 ----- .../lib/google/cloud/profiler/version.rb | 26 - .../test/google/cloud/profiler/client_test.rb | 85 -- .../google/cloud/profiler/version_test.rb | 26 - .../google-cloud-profiler/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- ...e-cloud-rapid_migration_assessment.gemspec | 27 - ...google-cloud-rapid_migration_assessment.rb | 19 - .../cloud/rapid_migration_assessment.rb | 157 --- .../rapid_migration_assessment/version.rb | 26 - .../rapid_migration_assessment/client_test.rb | 64 -- .../version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../google-cloud-recaptcha_enterprise/Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- .../google-cloud-recaptcha_enterprise.gemspec | 27 - .../lib/google-cloud-recaptcha_enterprise.rb | 19 - .../lib/google/cloud/recaptcha_enterprise.rb | 148 --- .../cloud/recaptcha_enterprise/version.rb | 26 - .../cloud/recaptcha_enterprise/client_test.rb | 53 - .../recaptcha_enterprise/version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- ...google-cloud-recommendation_engine.gemspec | 27 - .../lib/google-cloud-recommendation_engine.rb | 19 - .../lib/google/cloud/recommendation_engine.rb | 371 ------- .../cloud/recommendation_engine/version.rb | 26 - .../recommendation_engine/client_test.rb | 127 --- .../recommendation_engine/version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-recommender/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-recommender/.rubocop.yml | 39 - .../google-cloud-recommender/.toys.rb | 28 - .../google-cloud-recommender/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../google-cloud-recommender/CHANGELOG.md | 2 - .../google-cloud-recommender/Gemfile | 32 - .../google-cloud-recommender/LICENSE.md | 201 ---- .../google-cloud-recommender/README.md | 142 --- .../google-cloud-recommender/Rakefile | 169 ---- .../google-cloud-recommender.gemspec | 27 - .../lib/google-cloud-recommender.rb | 19 - .../lib/google/cloud/recommender.rb | 160 --- .../lib/google/cloud/recommender/version.rb | 26 - .../google/cloud/recommender/client_test.rb | 64 -- .../google/cloud/recommender/version_test.rb | 26 - .../google-cloud-recommender/test/helper.rb | 35 - .../google-cloud-redis-cluster/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-cloud-redis-cluster/.rubocop.yml | 39 - .../google-cloud-redis-cluster/.toys.rb | 28 - .../google-cloud-redis-cluster/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../google-cloud-redis-cluster/CHANGELOG.md | 2 - .../google-cloud-redis-cluster/Gemfile | 32 - .../google-cloud-redis-cluster/LICENSE.md | 201 ---- .../google-cloud-redis-cluster/README.md | 141 --- .../google-cloud-redis-cluster/Rakefile | 169 ---- .../google-cloud-redis-cluster.gemspec | 27 - .../lib/google-cloud-redis-cluster.rb | 19 - .../lib/google/cloud/redis/cluster.rb | 173 ---- .../lib/google/cloud/redis/cluster/version.rb | 28 - .../google/cloud/redis/cluster/client_test.rb | 64 -- .../cloud/redis/cluster/version_test.rb | 26 - .../google-cloud-redis-cluster/test/helper.rb | 35 - owl-bot-staging/google-cloud-redis/.gitignore | 20 - .../google-cloud-redis/.repo-metadata.json | 18 - .../google-cloud-redis/.rubocop.yml | 39 - owl-bot-staging/google-cloud-redis/.toys.rb | 28 - owl-bot-staging/google-cloud-redis/.yardopts | 11 - .../google-cloud-redis/AUTHENTICATION.md | 122 --- .../google-cloud-redis/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-redis/Gemfile | 32 - owl-bot-staging/google-cloud-redis/LICENSE.md | 201 ---- owl-bot-staging/google-cloud-redis/README.md | 142 --- owl-bot-staging/google-cloud-redis/Rakefile | 169 ---- .../google-cloud-redis.gemspec | 27 - .../lib/google-cloud-redis.rb | 19 - .../lib/google/cloud/redis.rb | 171 ---- .../lib/google/cloud/redis/version.rb | 26 - .../test/google/cloud/redis/client_test.rb | 64 -- .../test/google/cloud/redis/version_test.rb | 26 - .../google-cloud-redis/test/helper.rb | 35 - .../google-cloud-resource_manager/.gitignore | 20 - .../.repo-metadata.json | 15 - .../.rubocop.yml | 39 - .../google-cloud-resource_manager/.toys.rb | 28 - .../google-cloud-resource_manager/.yardopts | 12 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../google-cloud-resource_manager/Gemfile | 32 - .../google-cloud-resource_manager/LICENSE.md | 201 ---- .../google-cloud-resource_manager/README.md | 147 --- .../google-cloud-resource_manager/Rakefile | 169 ---- .../google-cloud-resource_manager.gemspec | 27 - .../lib/google-cloud-resource_manager.rb | 19 - .../lib/google/cloud/resource_manager.rb | 584 ----------- .../google/cloud/resource_manager/version.rb | 26 - .../cloud/resource_manager/client_test.rb | 190 ---- .../cloud/resource_manager/version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-retail/.gitignore | 20 - .../google-cloud-retail/.repo-metadata.json | 18 - .../google-cloud-retail/.rubocop.yml | 39 - owl-bot-staging/google-cloud-retail/.toys.rb | 28 - owl-bot-staging/google-cloud-retail/.yardopts | 11 - .../google-cloud-retail/AUTHENTICATION.md | 122 --- .../google-cloud-retail/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-retail/Gemfile | 32 - .../google-cloud-retail/LICENSE.md | 201 ---- owl-bot-staging/google-cloud-retail/README.md | 142 --- owl-bot-staging/google-cloud-retail/Rakefile | 169 ---- .../google-cloud-retail.gemspec | 27 - .../lib/google-cloud-retail.rb | 19 - .../lib/google/cloud/retail.rb | 950 ------------------ .../lib/google/cloud/retail/version.rb | 26 - .../test/google/cloud/retail/client_test.rb | 295 ------ .../test/google/cloud/retail/version_test.rb | 26 - .../google-cloud-retail/test/helper.rb | 35 - .../google-cloud-run-client/.gitignore | 20 - .../.repo-metadata.json | 17 - .../google-cloud-run-client/.rubocop.yml | 39 - .../google-cloud-run-client/.toys.rb | 28 - .../google-cloud-run-client/.yardopts | 11 - .../google-cloud-run-client/AUTHENTICATION.md | 122 --- .../google-cloud-run-client/CHANGELOG.md | 2 - .../google-cloud-run-client/Gemfile | 32 - .../google-cloud-run-client/LICENSE.md | 201 ---- .../google-cloud-run-client/README.md | 142 --- .../google-cloud-run-client/Rakefile | 169 ---- .../google-cloud-run.gemspec | 27 - .../lib/google-cloud-run.rb | 19 - .../lib/google/cloud/run.rb | 647 ------------ .../lib/google/cloud/run/version.rb | 26 - .../test/google/cloud/run/client_test.rb | 211 ---- .../test/google/cloud/run/version_test.rb | 26 - .../google-cloud-run-client/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- ...ud-saas_platform-saas_service_mgmt.gemspec | 27 - ...e-cloud-saas_platform-saas_service_mgmt.rb | 19 - .../cloud/saas_platform/saas_service_mgmt.rb | 229 ----- .../saas_service_mgmt/version.rb | 28 - .../saas_service_mgmt/client_test.rb | 85 -- .../saas_service_mgmt/version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-scheduler/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-scheduler/.rubocop.yml | 39 - .../google-cloud-scheduler/.toys.rb | 28 - .../google-cloud-scheduler/.yardopts | 11 - .../google-cloud-scheduler/AUTHENTICATION.md | 122 --- .../google-cloud-scheduler/CHANGELOG.md | 2 - .../google-cloud-scheduler/Gemfile | 32 - .../google-cloud-scheduler/LICENSE.md | 201 ---- .../google-cloud-scheduler/README.md | 142 --- .../google-cloud-scheduler/Rakefile | 169 ---- .../google-cloud-scheduler.gemspec | 27 - .../lib/google-cloud-scheduler.rb | 19 - .../lib/google/cloud/scheduler.rb | 158 --- .../lib/google/cloud/scheduler/version.rb | 26 - .../google/cloud/scheduler/client_test.rb | 64 -- .../google/cloud/scheduler/version_test.rb | 26 - .../google-cloud-scheduler/test/helper.rb | 35 - .../google-cloud-secret_manager/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-secret_manager/.rubocop.yml | 39 - .../google-cloud-secret_manager/.toys.rb | 28 - .../google-cloud-secret_manager/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../google-cloud-secret_manager/CHANGELOG.md | 2 - .../google-cloud-secret_manager/Gemfile | 32 - .../google-cloud-secret_manager/LICENSE.md | 201 ---- .../google-cloud-secret_manager/README.md | 142 --- .../google-cloud-secret_manager/Rakefile | 169 ---- .../google-cloud-secret_manager.gemspec | 27 - .../lib/google-cloud-secret_manager.rb | 19 - .../lib/google/cloud/secret_manager.rb | 154 --- .../google/cloud/secret_manager/version.rb | 26 - .../cloud/secret_manager/client_test.rb | 53 - .../cloud/secret_manager/version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- ...google-cloud-secure_source_manager.gemspec | 27 - .../lib/google-cloud-secure_source_manager.rb | 19 - .../lib/google/cloud/secure_source_manager.rb | 159 --- .../cloud/secure_source_manager/version.rb | 26 - .../secure_source_manager/client_test.rb | 64 -- .../secure_source_manager/version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../google-cloud-security-private_ca/.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../google-cloud-security-private_ca/Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../google-cloud-security-private_ca/Rakefile | 169 ---- .../google-cloud-security-private_ca.gemspec | 27 - .../lib/google-cloud-security-private_ca.rb | 19 - .../lib/google/cloud/security/private_ca.rb | 161 --- .../cloud/security/private_ca/version.rb | 28 - .../cloud/security/private_ca/client_test.rb | 64 -- .../cloud/security/private_ca/version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../google-cloud-security-public_ca/.toys.rb | 28 - .../google-cloud-security-public_ca/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../google-cloud-security-public_ca/Gemfile | 32 - .../LICENSE.md | 201 ---- .../google-cloud-security-public_ca/README.md | 142 --- .../google-cloud-security-public_ca/Rakefile | 169 ---- .../google-cloud-security-public_ca.gemspec | 27 - .../lib/google-cloud-security-public_ca.rb | 19 - .../lib/google/cloud/security/public_ca.rb | 161 --- .../cloud/security/public_ca/version.rb | 28 - .../cloud/security/public_ca/client_test.rb | 64 -- .../cloud/security/public_ca/version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-security_center/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-security_center/.rubocop.yml | 39 - .../google-cloud-security_center/.toys.rb | 28 - .../google-cloud-security_center/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../google-cloud-security_center/CHANGELOG.md | 2 - .../google-cloud-security_center/Gemfile | 32 - .../google-cloud-security_center/LICENSE.md | 201 ---- .../google-cloud-security_center/README.md | 144 --- .../google-cloud-security_center/Rakefile | 169 ---- .../google-cloud-security_center.gemspec | 28 - .../lib/google-cloud-security_center.rb | 19 - .../lib/google/cloud/security_center.rb | 157 --- .../google/cloud/security_center/version.rb | 26 - .../cloud/security_center/client_test.rb | 64 -- .../cloud/security_center/version_test.rb | 26 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../CHANGELOG.md | 2 - .../Gemfile | 32 - .../LICENSE.md | 201 ---- .../README.md | 142 --- .../Rakefile | 169 ---- ...e-cloud-security_center_management.gemspec | 27 - ...google-cloud-security_center_management.rb | 19 - .../cloud/security_center_management.rb | 157 --- .../security_center_management/version.rb | 26 - .../security_center_management/client_test.rb | 64 -- .../version_test.rb | 26 - .../test/helper.rb | 35 - .../google-cloud-service_control/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-service_control/.rubocop.yml | 39 - .../google-cloud-service_control/.toys.rb | 28 - .../google-cloud-service_control/.yardopts | 11 - .../AUTHENTICATION.md | 122 --- .../google-cloud-service_control/CHANGELOG.md | 2 - .../google-cloud-service_control/Gemfile | 32 - .../google-cloud-service_control/LICENSE.md | 201 ---- .../google-cloud-service_control/README.md | 142 --- .../google-cloud-service_control/Rakefile | 169 ---- .../google-cloud-service_control.gemspec | 27 - .../lib/google-cloud-service_control.rb | 19 - .../lib/google/cloud/service_control.rb | 234 ----- .../google/cloud/service_control/version.rb | 26 - .../cloud/service_control/client_test.rb | 85 -- .../cloud/service_control/version_test.rb | 26 - .../test/helper.rb | 35 - 533 files changed, 186 insertions(+), 25719 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-product_registry/.gitignore delete mode 100644 owl-bot-staging/google-cloud-product_registry/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-product_registry/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-product_registry/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/.yardopts delete mode 100644 owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-product_registry/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-product_registry/Gemfile delete mode 100644 owl-bot-staging/google-cloud-product_registry/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-product_registry/README.md delete mode 100644 owl-bot-staging/google-cloud-product_registry/Rakefile delete mode 100644 owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec delete mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/.gitignore delete mode 100644 owl-bot-staging/google-cloud-profiler/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-profiler/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-profiler/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/.yardopts delete mode 100644 owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-profiler/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-profiler/Gemfile delete mode 100644 owl-bot-staging/google-cloud-profiler/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-profiler/README.md delete mode 100644 owl-bot-staging/google-cloud-profiler/Rakefile delete mode 100644 owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec delete mode 100644 owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-profiler/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/README.md delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/Rakefile delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/README.md delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/Rakefile delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.gitignore delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/.yardopts delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/Gemfile delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/README.md delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/Rakefile delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/.gitignore delete mode 100644 owl-bot-staging/google-cloud-recommender/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-recommender/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-recommender/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/.yardopts delete mode 100644 owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-recommender/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-recommender/Gemfile delete mode 100644 owl-bot-staging/google-cloud-recommender/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-recommender/README.md delete mode 100644 owl-bot-staging/google-cloud-recommender/Rakefile delete mode 100644 owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec delete mode 100644 owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-recommender/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/.gitignore delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/.yardopts delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/Gemfile delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/README.md delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/Rakefile delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-redis-cluster/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-redis/.gitignore delete mode 100644 owl-bot-staging/google-cloud-redis/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-redis/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-redis/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-redis/.yardopts delete mode 100644 owl-bot-staging/google-cloud-redis/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-redis/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-redis/Gemfile delete mode 100644 owl-bot-staging/google-cloud-redis/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-redis/README.md delete mode 100644 owl-bot-staging/google-cloud-redis/Rakefile delete mode 100644 owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec delete mode 100644 owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb delete mode 100644 owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb delete mode 100644 owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb delete mode 100644 owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-redis/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/.gitignore delete mode 100644 owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-resource_manager/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-resource_manager/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/.yardopts delete mode 100644 owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-resource_manager/Gemfile delete mode 100644 owl-bot-staging/google-cloud-resource_manager/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-resource_manager/README.md delete mode 100644 owl-bot-staging/google-cloud-resource_manager/Rakefile delete mode 100644 owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec delete mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-resource_manager/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-retail/.gitignore delete mode 100644 owl-bot-staging/google-cloud-retail/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-retail/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-retail/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-retail/.yardopts delete mode 100644 owl-bot-staging/google-cloud-retail/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-retail/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-retail/Gemfile delete mode 100644 owl-bot-staging/google-cloud-retail/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-retail/README.md delete mode 100644 owl-bot-staging/google-cloud-retail/Rakefile delete mode 100644 owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec delete mode 100644 owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb delete mode 100644 owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb delete mode 100644 owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb delete mode 100644 owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-retail/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/.gitignore delete mode 100644 owl-bot-staging/google-cloud-run-client/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-run-client/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-run-client/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/.yardopts delete mode 100644 owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-run-client/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-run-client/Gemfile delete mode 100644 owl-bot-staging/google-cloud-run-client/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-run-client/README.md delete mode 100644 owl-bot-staging/google-cloud-run-client/Rakefile delete mode 100644 owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec delete mode 100644 owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-run-client/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Rakefile delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/.gitignore delete mode 100644 owl-bot-staging/google-cloud-scheduler/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-scheduler/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-scheduler/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/.yardopts delete mode 100644 owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-scheduler/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-scheduler/Gemfile delete mode 100644 owl-bot-staging/google-cloud-scheduler/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-scheduler/README.md delete mode 100644 owl-bot-staging/google-cloud-scheduler/Rakefile delete mode 100644 owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec delete mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-scheduler/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/.gitignore delete mode 100644 owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-secret_manager/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/.yardopts delete mode 100644 owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secret_manager/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager/README.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager/Rakefile delete mode 100644 owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec delete mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.gitignore delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/.yardopts delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/README.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/Rakefile delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/README.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/README.md delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-public_ca/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center_management/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center_management/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center_management/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_control/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_control/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_control/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_control/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_control/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_control/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_control/README.md delete mode 100644 owl-bot-staging/google-cloud-service_control/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control/test/helper.rb diff --git a/google-cloud-product_registry/.owlbot-manifest.json b/google-cloud-product_registry/.owlbot-manifest.json index 13ade79c3d92..54a1489f64a0 100644 --- a/google-cloud-product_registry/.owlbot-manifest.json +++ b/google-cloud-product_registry/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-product_registry/Gemfile b/google-cloud-product_registry/Gemfile index 33f1edc61b6e..cfdc76941470 100644 --- a/google-cloud-product_registry/Gemfile +++ b/google-cloud-product_registry/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-profiler/.owlbot-manifest.json b/google-cloud-profiler/.owlbot-manifest.json index cefa176a1607..c07622cc7ea0 100644 --- a/google-cloud-profiler/.owlbot-manifest.json +++ b/google-cloud-profiler/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-profiler/.toys.rb b/google-cloud-profiler/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-profiler/.toys.rb +++ b/google-cloud-profiler/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/Gemfile b/google-cloud-profiler/Gemfile index ab3bff45d41f..e9c272fd6ddd 100644 --- a/google-cloud-profiler/Gemfile +++ b/google-cloud-profiler/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-profiler/Rakefile b/google-cloud-profiler/Rakefile index a371e29546a2..d5348d15ab40 100644 --- a/google-cloud-profiler/Rakefile +++ b/google-cloud-profiler/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/lib/google-cloud-profiler.rb b/google-cloud-profiler/lib/google-cloud-profiler.rb index fc7abbcb0cec..2aeff728ee34 100644 --- a/google-cloud-profiler/lib/google-cloud-profiler.rb +++ b/google-cloud-profiler/lib/google-cloud-profiler.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/lib/google/cloud/profiler.rb b/google-cloud-profiler/lib/google/cloud/profiler.rb index 0189811e1e3e..d38b8ce87a80 100644 --- a/google-cloud-profiler/lib/google/cloud/profiler.rb +++ b/google-cloud-profiler/lib/google/cloud/profiler.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/test/google/cloud/profiler/client_test.rb b/google-cloud-profiler/test/google/cloud/profiler/client_test.rb index 67ad2e5feb9a..e3a0d1dcc342 100644 --- a/google-cloud-profiler/test/google/cloud/profiler/client_test.rb +++ b/google-cloud-profiler/test/google/cloud/profiler/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/test/google/cloud/profiler/version_test.rb b/google-cloud-profiler/test/google/cloud/profiler/version_test.rb index eec5450edc54..19e7626008b0 100644 --- a/google-cloud-profiler/test/google/cloud/profiler/version_test.rb +++ b/google-cloud-profiler/test/google/cloud/profiler/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-profiler/test/helper.rb b/google-cloud-profiler/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-profiler/test/helper.rb +++ b/google-cloud-profiler/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/.owlbot-manifest.json b/google-cloud-rapid_migration_assessment/.owlbot-manifest.json index 469ce2af3c19..dc775b47f457 100644 --- a/google-cloud-rapid_migration_assessment/.owlbot-manifest.json +++ b/google-cloud-rapid_migration_assessment/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-rapid_migration_assessment/.toys.rb b/google-cloud-rapid_migration_assessment/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-rapid_migration_assessment/.toys.rb +++ b/google-cloud-rapid_migration_assessment/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/Gemfile b/google-cloud-rapid_migration_assessment/Gemfile index b81621adc8bb..2c9d94368a6e 100644 --- a/google-cloud-rapid_migration_assessment/Gemfile +++ b/google-cloud-rapid_migration_assessment/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-rapid_migration_assessment/Rakefile b/google-cloud-rapid_migration_assessment/Rakefile index 5187c01b5ead..a4f6110ae221 100644 --- a/google-cloud-rapid_migration_assessment/Rakefile +++ b/google-cloud-rapid_migration_assessment/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb b/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb index 775981a15b94..e24e54ee8658 100644 --- a/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb +++ b/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb b/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb index 4c7072a489c2..3497a0fa20f8 100644 --- a/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb +++ b/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb b/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb index 912e6989c120..705fb490d739 100644 --- a/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb +++ b/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb b/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb index 28847cb6eb48..61766b818718 100644 --- a/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb +++ b/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-rapid_migration_assessment/test/helper.rb b/google-cloud-rapid_migration_assessment/test/helper.rb index 7e4ec6975a18..4fb6756ac7e2 100644 --- a/google-cloud-rapid_migration_assessment/test/helper.rb +++ b/google-cloud-rapid_migration_assessment/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/.owlbot-manifest.json b/google-cloud-recaptcha_enterprise/.owlbot-manifest.json index f973446c2bb5..c21b6d4c154d 100644 --- a/google-cloud-recaptcha_enterprise/.owlbot-manifest.json +++ b/google-cloud-recaptcha_enterprise/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "MIGRATING.md", "samples/.rubocop.yml", "samples/Gemfile", diff --git a/google-cloud-recaptcha_enterprise/.toys.rb b/google-cloud-recaptcha_enterprise/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-recaptcha_enterprise/.toys.rb +++ b/google-cloud-recaptcha_enterprise/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/Gemfile b/google-cloud-recaptcha_enterprise/Gemfile index b789a4e36b50..d08328f1bac2 100644 --- a/google-cloud-recaptcha_enterprise/Gemfile +++ b/google-cloud-recaptcha_enterprise/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-recaptcha_enterprise/Rakefile b/google-cloud-recaptcha_enterprise/Rakefile index 6c0098a2ae72..8801ccc811f1 100644 --- a/google-cloud-recaptcha_enterprise/Rakefile +++ b/google-cloud-recaptcha_enterprise/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb b/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb index 145b6d308bc9..7a2eb0be3ece 100644 --- a/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb +++ b/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb b/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb index ef122940f88e..feac7c465136 100644 --- a/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb +++ b/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb b/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb index aeb91e0925d9..8875f83e7aff 100644 --- a/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb +++ b/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb b/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb index a1b190c3b8b4..cfc6497f1d9b 100644 --- a/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb +++ b/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recaptcha_enterprise/test/helper.rb b/google-cloud-recaptcha_enterprise/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-recaptcha_enterprise/test/helper.rb +++ b/google-cloud-recaptcha_enterprise/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/.owlbot-manifest.json b/google-cloud-recommendation_engine/.owlbot-manifest.json index 9d6a754d637f..f77a411ddd62 100644 --- a/google-cloud-recommendation_engine/.owlbot-manifest.json +++ b/google-cloud-recommendation_engine/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-recommendation_engine/.toys.rb b/google-cloud-recommendation_engine/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-recommendation_engine/.toys.rb +++ b/google-cloud-recommendation_engine/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/Gemfile b/google-cloud-recommendation_engine/Gemfile index 71197280dc8e..977763624f4a 100644 --- a/google-cloud-recommendation_engine/Gemfile +++ b/google-cloud-recommendation_engine/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-recommendation_engine/Rakefile b/google-cloud-recommendation_engine/Rakefile index 03123579a525..3a827aff4b13 100644 --- a/google-cloud-recommendation_engine/Rakefile +++ b/google-cloud-recommendation_engine/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb b/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb index f8bb56c7024a..afc81d0994a6 100644 --- a/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb +++ b/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb b/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb index 401f94329f95..bf98c7f7d3aa 100644 --- a/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb +++ b/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb b/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb index 611931020471..f582f7064a11 100644 --- a/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb +++ b/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb b/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb index c7a424786601..fd4e833d1a0e 100644 --- a/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb +++ b/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommendation_engine/test/helper.rb b/google-cloud-recommendation_engine/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-recommendation_engine/test/helper.rb +++ b/google-cloud-recommendation_engine/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/.owlbot-manifest.json b/google-cloud-recommender/.owlbot-manifest.json index 200843f0a856..2079092608b8 100644 --- a/google-cloud-recommender/.owlbot-manifest.json +++ b/google-cloud-recommender/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-recommender/.toys.rb b/google-cloud-recommender/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-recommender/.toys.rb +++ b/google-cloud-recommender/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/Gemfile b/google-cloud-recommender/Gemfile index 797ade4013c1..0b6d1ac9b148 100644 --- a/google-cloud-recommender/Gemfile +++ b/google-cloud-recommender/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-recommender/Rakefile b/google-cloud-recommender/Rakefile index 0ab03385f7ef..c04db1ffb5eb 100644 --- a/google-cloud-recommender/Rakefile +++ b/google-cloud-recommender/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/lib/google-cloud-recommender.rb b/google-cloud-recommender/lib/google-cloud-recommender.rb index d049ae54d363..ac3b14c26b03 100644 --- a/google-cloud-recommender/lib/google-cloud-recommender.rb +++ b/google-cloud-recommender/lib/google-cloud-recommender.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/lib/google/cloud/recommender.rb b/google-cloud-recommender/lib/google/cloud/recommender.rb index 65ef197a9345..6588abd6e9a0 100644 --- a/google-cloud-recommender/lib/google/cloud/recommender.rb +++ b/google-cloud-recommender/lib/google/cloud/recommender.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/test/google/cloud/recommender/client_test.rb b/google-cloud-recommender/test/google/cloud/recommender/client_test.rb index 5dbe2f6cd155..c7303bf4879a 100644 --- a/google-cloud-recommender/test/google/cloud/recommender/client_test.rb +++ b/google-cloud-recommender/test/google/cloud/recommender/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/test/google/cloud/recommender/version_test.rb b/google-cloud-recommender/test/google/cloud/recommender/version_test.rb index c6dfa146e040..c28abec8aed6 100644 --- a/google-cloud-recommender/test/google/cloud/recommender/version_test.rb +++ b/google-cloud-recommender/test/google/cloud/recommender/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-recommender/test/helper.rb b/google-cloud-recommender/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-recommender/test/helper.rb +++ b/google-cloud-recommender/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/.owlbot-manifest.json b/google-cloud-redis-cluster/.owlbot-manifest.json index 79e07d3f2eaf..1dacd38fa86e 100644 --- a/google-cloud-redis-cluster/.owlbot-manifest.json +++ b/google-cloud-redis-cluster/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-redis-cluster/.toys.rb b/google-cloud-redis-cluster/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-redis-cluster/.toys.rb +++ b/google-cloud-redis-cluster/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/Gemfile b/google-cloud-redis-cluster/Gemfile index 9ce5fdcc3191..8358ea525575 100644 --- a/google-cloud-redis-cluster/Gemfile +++ b/google-cloud-redis-cluster/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-redis-cluster/Rakefile b/google-cloud-redis-cluster/Rakefile index e96492bd888d..2738a728b0eb 100644 --- a/google-cloud-redis-cluster/Rakefile +++ b/google-cloud-redis-cluster/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb b/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb index 296e1e3febca..32acf287e53b 100644 --- a/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb +++ b/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb b/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb index 37c0a54a4940..9b8f045877fa 100644 --- a/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb +++ b/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb b/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb index 39277b8bc2c3..ebe5ffde87a6 100644 --- a/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb +++ b/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb b/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb index daccce198bbd..f4255931d11b 100644 --- a/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb +++ b/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis-cluster/test/helper.rb b/google-cloud-redis-cluster/test/helper.rb index 7e4ec6975a18..4fb6756ac7e2 100644 --- a/google-cloud-redis-cluster/test/helper.rb +++ b/google-cloud-redis-cluster/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/.owlbot-manifest.json b/google-cloud-redis/.owlbot-manifest.json index 34e9cdc1727f..4272c6a88f4e 100644 --- a/google-cloud-redis/.owlbot-manifest.json +++ b/google-cloud-redis/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "MIGRATING.md", "acceptance/redis_smoke_test.rb" ] diff --git a/google-cloud-redis/.toys.rb b/google-cloud-redis/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-redis/.toys.rb +++ b/google-cloud-redis/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/Gemfile b/google-cloud-redis/Gemfile index e5797ce4d4b7..f8ca4d7fc143 100644 --- a/google-cloud-redis/Gemfile +++ b/google-cloud-redis/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-redis/Rakefile b/google-cloud-redis/Rakefile index a7ac32ae82ed..fab25f21e041 100644 --- a/google-cloud-redis/Rakefile +++ b/google-cloud-redis/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/lib/google-cloud-redis.rb b/google-cloud-redis/lib/google-cloud-redis.rb index 04d484e290ae..24f7f7efe908 100644 --- a/google-cloud-redis/lib/google-cloud-redis.rb +++ b/google-cloud-redis/lib/google-cloud-redis.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/lib/google/cloud/redis.rb b/google-cloud-redis/lib/google/cloud/redis.rb index 2d65cb174bb0..369b2b1354be 100644 --- a/google-cloud-redis/lib/google/cloud/redis.rb +++ b/google-cloud-redis/lib/google/cloud/redis.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/test/google/cloud/redis/client_test.rb b/google-cloud-redis/test/google/cloud/redis/client_test.rb index 3d32a891fbac..73cd355f4744 100644 --- a/google-cloud-redis/test/google/cloud/redis/client_test.rb +++ b/google-cloud-redis/test/google/cloud/redis/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/test/google/cloud/redis/version_test.rb b/google-cloud-redis/test/google/cloud/redis/version_test.rb index e089e0a02cec..d762219f9508 100644 --- a/google-cloud-redis/test/google/cloud/redis/version_test.rb +++ b/google-cloud-redis/test/google/cloud/redis/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-redis/test/helper.rb b/google-cloud-redis/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-redis/test/helper.rb +++ b/google-cloud-redis/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/.owlbot-manifest.json b/google-cloud-resource_manager/.owlbot-manifest.json index b63b99f71b1c..9ba0e1ff3778 100644 --- a/google-cloud-resource_manager/.owlbot-manifest.json +++ b/google-cloud-resource_manager/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "MIGRATING.md" ] } diff --git a/google-cloud-resource_manager/.toys.rb b/google-cloud-resource_manager/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-cloud-resource_manager/.toys.rb +++ b/google-cloud-resource_manager/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/Gemfile b/google-cloud-resource_manager/Gemfile index 3bb4298c4c6e..7b834f17cdbd 100644 --- a/google-cloud-resource_manager/Gemfile +++ b/google-cloud-resource_manager/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-resource_manager/Rakefile b/google-cloud-resource_manager/Rakefile index d15bae7ac9e0..46ca31bfc501 100644 --- a/google-cloud-resource_manager/Rakefile +++ b/google-cloud-resource_manager/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb b/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb index 68d2f7fc915f..a17c3b857361 100644 --- a/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb +++ b/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb b/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb index 07e801af4b23..62583916a9e9 100644 --- a/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb +++ b/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb b/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb index 5da0efc09e37..76d471122b3a 100644 --- a/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb +++ b/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb b/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb index 9cef7c617934..23c8cdbe40ca 100644 --- a/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb +++ b/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-resource_manager/test/helper.rb b/google-cloud-resource_manager/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-cloud-resource_manager/test/helper.rb +++ b/google-cloud-resource_manager/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/.owlbot-manifest.json b/google-cloud-retail/.owlbot-manifest.json index aec5964b0587..be8d09d2e8a3 100644 --- a/google-cloud-retail/.owlbot-manifest.json +++ b/google-cloud-retail/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-retail/.toys.rb b/google-cloud-retail/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-retail/.toys.rb +++ b/google-cloud-retail/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/Gemfile b/google-cloud-retail/Gemfile index 4fabf5e7ca9b..27a0cf18da6d 100644 --- a/google-cloud-retail/Gemfile +++ b/google-cloud-retail/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-retail/Rakefile b/google-cloud-retail/Rakefile index dcb8447c38cb..b6f97c47d721 100644 --- a/google-cloud-retail/Rakefile +++ b/google-cloud-retail/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/lib/google-cloud-retail.rb b/google-cloud-retail/lib/google-cloud-retail.rb index fdeda691f6cf..5d5f31cfdc1d 100644 --- a/google-cloud-retail/lib/google-cloud-retail.rb +++ b/google-cloud-retail/lib/google-cloud-retail.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/lib/google/cloud/retail.rb b/google-cloud-retail/lib/google/cloud/retail.rb index 42aca8453315..2e2588f59658 100644 --- a/google-cloud-retail/lib/google/cloud/retail.rb +++ b/google-cloud-retail/lib/google/cloud/retail.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/test/google/cloud/retail/client_test.rb b/google-cloud-retail/test/google/cloud/retail/client_test.rb index 5804475f0387..66c341b97da2 100644 --- a/google-cloud-retail/test/google/cloud/retail/client_test.rb +++ b/google-cloud-retail/test/google/cloud/retail/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/test/google/cloud/retail/version_test.rb b/google-cloud-retail/test/google/cloud/retail/version_test.rb index 5ec0205da554..d6b0727bd7a8 100644 --- a/google-cloud-retail/test/google/cloud/retail/version_test.rb +++ b/google-cloud-retail/test/google/cloud/retail/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-retail/test/helper.rb b/google-cloud-retail/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-retail/test/helper.rb +++ b/google-cloud-retail/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/.owlbot-manifest.json b/google-cloud-run-client/.owlbot-manifest.json index b87b2d5c02f8..278c0003684d 100644 --- a/google-cloud-run-client/.owlbot-manifest.json +++ b/google-cloud-run-client/.owlbot-manifest.json @@ -21,6 +21,7 @@ "static": [ ".OwlBot.yaml", ".owlbot.rb", + "Gemfile.lock", "lib/google/cloud/run/client/version.rb" ] } diff --git a/google-cloud-run-client/.toys.rb b/google-cloud-run-client/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-run-client/.toys.rb +++ b/google-cloud-run-client/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/Gemfile b/google-cloud-run-client/Gemfile index 69b3a017e4be..1300029f7877 100644 --- a/google-cloud-run-client/Gemfile +++ b/google-cloud-run-client/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-run-client/Rakefile b/google-cloud-run-client/Rakefile index ed3b11d33d08..647ee5c8fd0a 100644 --- a/google-cloud-run-client/Rakefile +++ b/google-cloud-run-client/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/lib/google-cloud-run-client.rb b/google-cloud-run-client/lib/google-cloud-run-client.rb index f96e36cfa05a..758f53dd69bd 100644 --- a/google-cloud-run-client/lib/google-cloud-run-client.rb +++ b/google-cloud-run-client/lib/google-cloud-run-client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/lib/google/cloud/run.rb b/google-cloud-run-client/lib/google/cloud/run.rb index 741df4b4f9e9..cb18fe75f49e 100644 --- a/google-cloud-run-client/lib/google/cloud/run.rb +++ b/google-cloud-run-client/lib/google/cloud/run.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/test/google/cloud/run/client_test.rb b/google-cloud-run-client/test/google/cloud/run/client_test.rb index 586bd3a6422c..798955480791 100644 --- a/google-cloud-run-client/test/google/cloud/run/client_test.rb +++ b/google-cloud-run-client/test/google/cloud/run/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/test/google/cloud/run/version_test.rb b/google-cloud-run-client/test/google/cloud/run/version_test.rb index 57a4086a3f11..b89406aba08f 100644 --- a/google-cloud-run-client/test/google/cloud/run/version_test.rb +++ b/google-cloud-run-client/test/google/cloud/run/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-run-client/test/helper.rb b/google-cloud-run-client/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-run-client/test/helper.rb +++ b/google-cloud-run-client/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/.owlbot-manifest.json b/google-cloud-saas_platform-saas_service_mgmt/.owlbot-manifest.json index 487f84961973..072139bd9a14 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/.owlbot-manifest.json +++ b/google-cloud-saas_platform-saas_service_mgmt/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-saas_platform-saas_service_mgmt/.toys.rb b/google-cloud-saas_platform-saas_service_mgmt/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/.toys.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/Gemfile b/google-cloud-saas_platform-saas_service_mgmt/Gemfile index 698d63d96b7a..8f88307f27d2 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/Gemfile +++ b/google-cloud-saas_platform-saas_service_mgmt/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-saas_platform-saas_service_mgmt/Rakefile b/google-cloud-saas_platform-saas_service_mgmt/Rakefile index cd5d03f576ef..10f8c02a616a 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/Rakefile +++ b/google-cloud-saas_platform-saas_service_mgmt/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb b/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb index e3666d90ddfb..864dbb472e44 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb b/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb index 144b01833604..938eab48ac66 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb b/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb index 7bca2889b0e4..75a386d33524 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb b/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb index f6d1cc1767be..b5ea633ed383 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb b/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb +++ b/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/.owlbot-manifest.json b/google-cloud-scheduler/.owlbot-manifest.json index 41b3e128c82c..9034f8d0e4ca 100644 --- a/google-cloud-scheduler/.owlbot-manifest.json +++ b/google-cloud-scheduler/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "MIGRATING.md", "samples/.rubocop.yml", "samples/Gemfile", diff --git a/google-cloud-scheduler/.toys.rb b/google-cloud-scheduler/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-scheduler/.toys.rb +++ b/google-cloud-scheduler/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/Gemfile b/google-cloud-scheduler/Gemfile index c256c293ca5a..c44a1a569acd 100644 --- a/google-cloud-scheduler/Gemfile +++ b/google-cloud-scheduler/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-scheduler/Rakefile b/google-cloud-scheduler/Rakefile index 2be14517cd9e..ca517666c458 100644 --- a/google-cloud-scheduler/Rakefile +++ b/google-cloud-scheduler/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/lib/google-cloud-scheduler.rb b/google-cloud-scheduler/lib/google-cloud-scheduler.rb index 0ab996e7e13e..5dbd39bbc30f 100644 --- a/google-cloud-scheduler/lib/google-cloud-scheduler.rb +++ b/google-cloud-scheduler/lib/google-cloud-scheduler.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/lib/google/cloud/scheduler.rb b/google-cloud-scheduler/lib/google/cloud/scheduler.rb index a725b1490c34..086445509c72 100644 --- a/google-cloud-scheduler/lib/google/cloud/scheduler.rb +++ b/google-cloud-scheduler/lib/google/cloud/scheduler.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb b/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb index b698ddf13a32..5ab48d5d0553 100644 --- a/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb +++ b/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb b/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb index 8d9af0249fb9..02bfe3ac6be4 100644 --- a/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb +++ b/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-scheduler/test/helper.rb b/google-cloud-scheduler/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-scheduler/test/helper.rb +++ b/google-cloud-scheduler/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/.owlbot-manifest.json b/google-cloud-secret_manager/.owlbot-manifest.json index c10c3991daed..317cd2e915f3 100644 --- a/google-cloud-secret_manager/.owlbot-manifest.json +++ b/google-cloud-secret_manager/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "samples/Gemfile", "samples/README.md", "samples/Rakefile", diff --git a/google-cloud-secret_manager/.toys.rb b/google-cloud-secret_manager/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-secret_manager/.toys.rb +++ b/google-cloud-secret_manager/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/Gemfile b/google-cloud-secret_manager/Gemfile index cfe361a06ed0..2fe2a37e1ebe 100644 --- a/google-cloud-secret_manager/Gemfile +++ b/google-cloud-secret_manager/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-secret_manager/Rakefile b/google-cloud-secret_manager/Rakefile index 082c725bc453..fde45ed3739d 100644 --- a/google-cloud-secret_manager/Rakefile +++ b/google-cloud-secret_manager/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb b/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb index 01570a3f2e42..ed54373735d2 100644 --- a/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb +++ b/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb b/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb index 35a2471be9b8..0d7f99c14013 100644 --- a/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb +++ b/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb b/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb index bb17c20d9a42..9bf24e4ef2a7 100644 --- a/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb +++ b/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb b/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb index 5caaf4a10db9..7188a10c49e1 100644 --- a/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb +++ b/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager/test/helper.rb b/google-cloud-secret_manager/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-secret_manager/test/helper.rb +++ b/google-cloud-secret_manager/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/.owlbot-manifest.json b/google-cloud-secure_source_manager/.owlbot-manifest.json index 2bd2b2bddba8..d9747d54cb50 100644 --- a/google-cloud-secure_source_manager/.owlbot-manifest.json +++ b/google-cloud-secure_source_manager/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-secure_source_manager/.toys.rb b/google-cloud-secure_source_manager/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-secure_source_manager/.toys.rb +++ b/google-cloud-secure_source_manager/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/Gemfile b/google-cloud-secure_source_manager/Gemfile index e6876a1229ba..62aad3de0c1f 100644 --- a/google-cloud-secure_source_manager/Gemfile +++ b/google-cloud-secure_source_manager/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-secure_source_manager/Rakefile b/google-cloud-secure_source_manager/Rakefile index 8fdbc27173e9..c7970accf7b4 100644 --- a/google-cloud-secure_source_manager/Rakefile +++ b/google-cloud-secure_source_manager/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb b/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb index 4b806d9b16bc..268a417c2881 100644 --- a/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb +++ b/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb index 8bce1298e52f..486b73863305 100644 --- a/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb +++ b/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb b/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb index 5c34fc3d1792..190212437d4c 100644 --- a/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb +++ b/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb b/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb index 4a092982fd90..bd800a9c364b 100644 --- a/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb +++ b/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secure_source_manager/test/helper.rb b/google-cloud-secure_source_manager/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-secure_source_manager/test/helper.rb +++ b/google-cloud-secure_source_manager/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/.owlbot-manifest.json b/google-cloud-security-private_ca/.owlbot-manifest.json index b97ed70ba4ce..fc6302f3786e 100644 --- a/google-cloud-security-private_ca/.owlbot-manifest.json +++ b/google-cloud-security-private_ca/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security-private_ca/.toys.rb b/google-cloud-security-private_ca/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security-private_ca/.toys.rb +++ b/google-cloud-security-private_ca/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/Gemfile b/google-cloud-security-private_ca/Gemfile index f83c3d64ddc1..75f48ab4c72a 100644 --- a/google-cloud-security-private_ca/Gemfile +++ b/google-cloud-security-private_ca/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-security-private_ca/Rakefile b/google-cloud-security-private_ca/Rakefile index 7861a5b90bc8..9d47be393410 100644 --- a/google-cloud-security-private_ca/Rakefile +++ b/google-cloud-security-private_ca/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb b/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb index 6b6f23e11444..dfcf801e91e7 100644 --- a/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb +++ b/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb b/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb index ab945f911bea..9e4201a2067f 100644 --- a/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb +++ b/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb b/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb index b41d6748906e..713e8a57dfed 100644 --- a/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb +++ b/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb b/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb index dcca0ced3d25..155f19753fba 100644 --- a/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb +++ b/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca/test/helper.rb b/google-cloud-security-private_ca/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-security-private_ca/test/helper.rb +++ b/google-cloud-security-private_ca/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/.owlbot-manifest.json b/google-cloud-security-public_ca/.owlbot-manifest.json index 99a6d8a4e3c6..b6e84150e03e 100644 --- a/google-cloud-security-public_ca/.owlbot-manifest.json +++ b/google-cloud-security-public_ca/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security-public_ca/.toys.rb b/google-cloud-security-public_ca/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security-public_ca/.toys.rb +++ b/google-cloud-security-public_ca/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/Gemfile b/google-cloud-security-public_ca/Gemfile index 2068de04f80a..b0f36d13850e 100644 --- a/google-cloud-security-public_ca/Gemfile +++ b/google-cloud-security-public_ca/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-security-public_ca/Rakefile b/google-cloud-security-public_ca/Rakefile index 5036054edc10..dd0c72029fb3 100644 --- a/google-cloud-security-public_ca/Rakefile +++ b/google-cloud-security-public_ca/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb b/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb index 72e40adef87c..02d86471dd61 100644 --- a/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb +++ b/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb b/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb index 808d760c4670..e74a9eb7a405 100644 --- a/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb +++ b/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb b/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb index fe3407641d34..5362979abaf9 100644 --- a/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb +++ b/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb b/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb index 6c928c8e1a43..90b9af92bc5c 100644 --- a/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb +++ b/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-public_ca/test/helper.rb b/google-cloud-security-public_ca/test/helper.rb index 8d97e8142b62..4fb6756ac7e2 100644 --- a/google-cloud-security-public_ca/test/helper.rb +++ b/google-cloud-security-public_ca/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/.owlbot-manifest.json b/google-cloud-security_center/.owlbot-manifest.json index 190ea301f0ce..9ff6f1bda12b 100644 --- a/google-cloud-security_center/.owlbot-manifest.json +++ b/google-cloud-security_center/.owlbot-manifest.json @@ -21,6 +21,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "MIGRATING.md", "samples/Gemfile", "samples/Rakefile", diff --git a/google-cloud-security_center/.toys.rb b/google-cloud-security_center/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center/.toys.rb +++ b/google-cloud-security_center/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/Gemfile b/google-cloud-security_center/Gemfile index 17b8c6a397ae..9ea5b10b9d72 100644 --- a/google-cloud-security_center/Gemfile +++ b/google-cloud-security_center/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-security_center/Rakefile b/google-cloud-security_center/Rakefile index 04b2f586c979..84bd60853024 100644 --- a/google-cloud-security_center/Rakefile +++ b/google-cloud-security_center/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/lib/google-cloud-security_center.rb b/google-cloud-security_center/lib/google-cloud-security_center.rb index 5e875bfafd46..fe6260d8dad8 100644 --- a/google-cloud-security_center/lib/google-cloud-security_center.rb +++ b/google-cloud-security_center/lib/google-cloud-security_center.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/lib/google/cloud/security_center.rb b/google-cloud-security_center/lib/google/cloud/security_center.rb index 24820a771b29..9b56b412b55e 100644 --- a/google-cloud-security_center/lib/google/cloud/security_center.rb +++ b/google-cloud-security_center/lib/google/cloud/security_center.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/test/google/cloud/security_center/client_test.rb b/google-cloud-security_center/test/google/cloud/security_center/client_test.rb index 7c6f12b6e0f7..8c3f1e06dfe4 100644 --- a/google-cloud-security_center/test/google/cloud/security_center/client_test.rb +++ b/google-cloud-security_center/test/google/cloud/security_center/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/test/google/cloud/security_center/version_test.rb b/google-cloud-security_center/test/google/cloud/security_center/version_test.rb index 381f0056c4bb..437d0c72c376 100644 --- a/google-cloud-security_center/test/google/cloud/security_center/version_test.rb +++ b/google-cloud-security_center/test/google/cloud/security_center/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center/test/helper.rb b/google-cloud-security_center/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-security_center/test/helper.rb +++ b/google-cloud-security_center/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/.owlbot-manifest.json b/google-cloud-security_center_management/.owlbot-manifest.json index e10a28a4ff48..4a0eca0de7a7 100644 --- a/google-cloud-security_center_management/.owlbot-manifest.json +++ b/google-cloud-security_center_management/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security_center_management/.toys.rb b/google-cloud-security_center_management/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center_management/.toys.rb +++ b/google-cloud-security_center_management/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/Gemfile b/google-cloud-security_center_management/Gemfile index d68801b279b4..4181426cc4c0 100644 --- a/google-cloud-security_center_management/Gemfile +++ b/google-cloud-security_center_management/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-security_center_management/Rakefile b/google-cloud-security_center_management/Rakefile index 9896a168dca9..ae4211523697 100644 --- a/google-cloud-security_center_management/Rakefile +++ b/google-cloud-security_center_management/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb b/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb index c6f10fd28be0..64a6361608f1 100644 --- a/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb +++ b/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb b/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb index 66f134fc7410..8c0d3abc31df 100644 --- a/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb +++ b/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb b/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb index e8bedc096801..0b41e9e51f38 100644 --- a/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb +++ b/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb b/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb index 40393eaa37c2..0e5abb53009e 100644 --- a/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb +++ b/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management/test/helper.rb b/google-cloud-security_center_management/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-security_center_management/test/helper.rb +++ b/google-cloud-security_center_management/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/.owlbot-manifest.json b/google-cloud-service_control/.owlbot-manifest.json index 39f706221255..2d3c1313fbe5 100644 --- a/google-cloud-service_control/.owlbot-manifest.json +++ b/google-cloud-service_control/.owlbot-manifest.json @@ -20,6 +20,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_control/.toys.rb b/google-cloud-service_control/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_control/.toys.rb +++ b/google-cloud-service_control/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/Gemfile b/google-cloud-service_control/Gemfile index 9540f302f26c..7c9d9fbef522 100644 --- a/google-cloud-service_control/Gemfile +++ b/google-cloud-service_control/Gemfile @@ -24,7 +24,7 @@ gem "irb", "~> 1.17" gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.5.0", require: false +gem "minitest-reporters", "~> 1.8.0", require: false gem "minitest-rg", "~> 5.3" gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" diff --git a/google-cloud-service_control/Rakefile b/google-cloud-service_control/Rakefile index c673a44a60dc..71014908742d 100644 --- a/google-cloud-service_control/Rakefile +++ b/google-cloud-service_control/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/lib/google-cloud-service_control.rb b/google-cloud-service_control/lib/google-cloud-service_control.rb index 32c65e5e42fa..dd4b9fda45e0 100644 --- a/google-cloud-service_control/lib/google-cloud-service_control.rb +++ b/google-cloud-service_control/lib/google-cloud-service_control.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/lib/google/cloud/service_control.rb b/google-cloud-service_control/lib/google/cloud/service_control.rb index 76728fcd6224..aab78a11e486 100644 --- a/google-cloud-service_control/lib/google/cloud/service_control.rb +++ b/google-cloud-service_control/lib/google/cloud/service_control.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/test/google/cloud/service_control/client_test.rb b/google-cloud-service_control/test/google/cloud/service_control/client_test.rb index d5a18794ee0d..6c5e27771a35 100644 --- a/google-cloud-service_control/test/google/cloud/service_control/client_test.rb +++ b/google-cloud-service_control/test/google/cloud/service_control/client_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/test/google/cloud/service_control/version_test.rb b/google-cloud-service_control/test/google/cloud/service_control/version_test.rb index f59a2a27bc19..6b1cc8ae1ce3 100644 --- a/google-cloud-service_control/test/google/cloud/service_control/version_test.rb +++ b/google-cloud-service_control/test/google/cloud/service_control/version_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_control/test/helper.rb b/google-cloud-service_control/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-service_control/test/helper.rb +++ b/google-cloud-service_control/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/owl-bot-staging/google-cloud-product_registry/.gitignore b/owl-bot-staging/google-cloud-product_registry/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json b/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json deleted file mode 100644 index 67ec5a31ea90..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "cloudproductregistry.googleapis.com", - "api_shortname": "cloudproductregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry/latest", - "distribution_name": "google-cloud-product_registry", - "is_cloud": true, - "language": "ruby", - "name": "cloudproductregistry", - "name_pretty": "Cloud Product Registry API", - "product_documentation": "https://docs.cloud.google.com/product-registry", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "cloudproductregistry.googleapis.com API.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/product-registry", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-product_registry/.rubocop.yml b/owl-bot-staging/google-cloud-product_registry/.rubocop.yml deleted file mode 100644 index 33d3adbe6e3b..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-product_registry.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-product_registry.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-product_registry/.toys.rb b/owl-bot-staging/google-cloud-product_registry/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-product_registry/.yardopts b/owl-bot-staging/google-cloud-product_registry/.yardopts deleted file mode 100644 index e998d2aef9a0..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Product Registry API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md b/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md deleted file mode 100644 index f86e2450cb90..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-product_registry library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-product_registry library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/product_registry" - -client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/product_registry" - -Google::Cloud::ProductRegistry.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-product_registry -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/product_registry" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md b/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-product_registry/Gemfile b/owl-bot-staging/google-cloud-product_registry/Gemfile deleted file mode 100644 index cfdc76941470..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-product_registry-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-product_registry.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-product_registry/LICENSE.md b/owl-bot-staging/google-cloud-product_registry/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-product_registry/README.md b/owl-bot-staging/google-cloud-product_registry/README.md deleted file mode 100644 index e1d218dc0050..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Ruby Client for the Cloud Product Registry API - -cloudproductregistry.googleapis.com API. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-product_registry-v*`. -The gem `google-cloud-product_registry` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry/latest) -for this library, google-cloud-product_registry, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-product_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest). - -See also the [Product Documentation](https://docs.cloud.google.com/product-registry) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-product_registry -``` - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudproductregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/product_registry" - -client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service -request = ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new # (request fields as keyword arguments...) -response = client.get_product_suite request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-product_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-product_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-product_registry-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-product_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-product_registry-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-product_registry/Rakefile b/owl-bot-staging/google-cloud-product_registry/Rakefile deleted file mode 100644 index b0448be0df00..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/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 = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-product_registry acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" - ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-product_registry gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-product_registry gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-product_registry gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-product_registry gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-product_registry" - header "google-cloud-product_registry rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-product_registry yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-product_registry test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-product_registry smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-product_registry acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec b/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec deleted file mode 100644 index bc0341efb847..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/google-cloud-product_registry.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/product_registry/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-product_registry" - gem.version = Google::Cloud::ProductRegistry::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "cloudproductregistry.googleapis.com API." - gem.summary = "cloudproductregistry.googleapis.com API." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-product_registry-v1", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb b/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb deleted file mode 100644 index 5de7d186c0d1..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/lib/google-cloud-product_registry.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/product_registry" unless defined? Google::Cloud::ProductRegistry::VERSION diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb deleted file mode 100644 index e66b84b078a7..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/product_registry/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :product_registry do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module ProductRegistry - ## - # Create a new client object for CloudProductRegistryReadService. - # - # By default, this returns an instance of - # [Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest/Google-Cloud-ProductRegistry-V1-CloudProductRegistryReadService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CloudProductRegistryReadService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CloudProductRegistryReadService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available?}. - # - # ## About CloudProductRegistryReadService - # - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.cloud_product_registry_read_service version: :v1, transport: :grpc, &block - require "google/cloud/product_registry/#{version.to_s.downcase}" - - package_name = Google::Cloud::ProductRegistry - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ProductRegistry.const_get(package_name).const_get(:CloudProductRegistryReadService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CloudProductRegistryReadService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ProductRegistry.cloud_product_registry_read_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CloudProductRegistryReadService service, - # or if the versioned client gem needs an update to support the CloudProductRegistryReadService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.cloud_product_registry_read_service_available? version: :v1, transport: :grpc - require "google/cloud/product_registry/#{version.to_s.downcase}" - package_name = Google::Cloud::ProductRegistry - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ProductRegistry.const_get package_name - return false unless service_module.const_defined? :CloudProductRegistryReadService - service_module = service_module.const_get :CloudProductRegistryReadService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-product_registry library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.product_registry if block_given? - - ::Google::Cloud.configure.product_registry - end - end - end -end - -helper_path = ::File.join __dir__, "product_registry", "helpers.rb" -require "google/cloud/product_registry/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb b/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.rb deleted file mode 100644 index 60406859ba95..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/lib/google/cloud/product_registry/version.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! - - -module Google - module Cloud - module ProductRegistry - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb deleted file mode 100644 index 735cda723404..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/product_registry" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::ProductRegistry::ClientConstructionMinitest < 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_cloud_product_registry_read_service_grpc - skip unless Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client, client - end - end - - def test_cloud_product_registry_read_service_rest - skip unless Google::Cloud::ProductRegistry.cloud_product_registry_read_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ProductRegistry.cloud_product_registry_read_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb b/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.rb deleted file mode 100644 index 8f462c5a313b..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/test/google/cloud/product_registry/version_test.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 "helper" -require "google/cloud/product_registry/version" - -class Google::Cloud::ProductRegistry::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::ProductRegistry::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-product_registry/test/helper.rb b/owl-bot-staging/google-cloud-product_registry/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-product_registry/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-profiler/.gitignore b/owl-bot-staging/google-cloud-profiler/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-profiler/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-profiler/.repo-metadata.json b/owl-bot-staging/google-cloud-profiler/.repo-metadata.json deleted file mode 100644 index 2ea671bbe7dc..000000000000 --- a/owl-bot-staging/google-cloud-profiler/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudprofiler.googleapis.com", - "api_shortname": "cloudprofiler", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-profiler/latest", - "distribution_name": "google-cloud-profiler", - "is_cloud": true, - "language": "ruby", - "name": "cloudprofiler", - "name_pretty": "Cloud Profiler API", - "product_documentation": "https://cloud.google.com/profiler/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code.", - "ruby-cloud-env-prefix": "PROFILER", - "ruby-cloud-product-url": "https://cloud.google.com/profiler/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-profiler/.rubocop.yml b/owl-bot-staging/google-cloud-profiler/.rubocop.yml deleted file mode 100644 index 12806b0627ab..000000000000 --- a/owl-bot-staging/google-cloud-profiler/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-profiler.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-profiler.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-profiler/.toys.rb b/owl-bot-staging/google-cloud-profiler/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-profiler/.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-profiler/.yardopts b/owl-bot-staging/google-cloud-profiler/.yardopts deleted file mode 100644 index e4b95f189bd2..000000000000 --- a/owl-bot-staging/google-cloud-profiler/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Profiler API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md b/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md deleted file mode 100644 index 59121f2318c0..000000000000 --- a/owl-bot-staging/google-cloud-profiler/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-profiler 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-profiler 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/profiler" - -client = Google::Cloud::Profiler.profiler_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/profiler" - -Google::Cloud::Profiler.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Profiler.profiler_service -``` - -### 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-profiler -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/profiler" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Profiler.profiler_service -``` - -### 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-profiler/CHANGELOG.md b/owl-bot-staging/google-cloud-profiler/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-profiler/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-profiler/Gemfile b/owl-bot-staging/google-cloud-profiler/Gemfile deleted file mode 100644 index e9c272fd6ddd..000000000000 --- a/owl-bot-staging/google-cloud-profiler/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-profiler-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-profiler.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-profiler/LICENSE.md b/owl-bot-staging/google-cloud-profiler/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-profiler/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-profiler/README.md b/owl-bot-staging/google-cloud-profiler/README.md deleted file mode 100644 index 9a673a4d2ee8..000000000000 --- a/owl-bot-staging/google-cloud-profiler/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Cloud Profiler API - -API Client library for the Cloud Profiler API - -Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-profiler-v*`. -The gem `google-cloud-profiler` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler/latest) -for this library, google-cloud-profiler, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-profiler-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest). - -See also the [Product Documentation](https://cloud.google.com/profiler/docs) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-profiler -``` - -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/cloudprofiler.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/profiler" - -client = Google::Cloud::Profiler.profiler_service -request = ::Google::Cloud::Profiler::V2::CreateProfileRequest.new # (request fields as keyword arguments...) -response = client.create_profile request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-profiler-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-profiler`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-profiler-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-profiler`. -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-profiler-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-profiler/Rakefile b/owl-bot-staging/google-cloud-profiler/Rakefile deleted file mode 100644 index d5348d15ab40..000000000000 --- a/owl-bot-staging/google-cloud-profiler/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 = true -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-profiler acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["PROFILER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["PROFILER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["PROFILER_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 PROFILER_TEST_PROJECT=test123 PROFILER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/profiler/v2/profiler_service/credentials" - ::Google::Cloud::Profiler::V2::ProfilerService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["PROFILER_PROJECT"] = project - ENV["PROFILER_TEST_PROJECT"] = project - ENV["PROFILER_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-profiler 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-profiler 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-profiler 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-profiler gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-profiler" - header "google-cloud-profiler rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-profiler yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-profiler 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-profiler 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-profiler 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-profiler/google-cloud-profiler.gemspec b/owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec deleted file mode 100644 index 1aa964ba91ff..000000000000 --- a/owl-bot-staging/google-cloud-profiler/google-cloud-profiler.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/profiler/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-profiler" - gem.version = Google::Cloud::Profiler::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code." - gem.summary = "API Client library for the Cloud Profiler 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-profiler-v2", ">= 0.9", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb b/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb deleted file mode 100644 index 2aeff728ee34..000000000000 --- a/owl-bot-staging/google-cloud-profiler/lib/google-cloud-profiler.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/profiler" unless defined? Google::Cloud::Profiler::VERSION diff --git a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.rb deleted file mode 100644 index d38b8ce87a80..000000000000 --- a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/profiler/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :profiler do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Profiler - ## - # Create a new client object for ProfilerService. - # - # By default, this returns an instance of - # [Google::Cloud::Profiler::V2::ProfilerService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ProfilerService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProfilerService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ProfilerService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Profiler.profiler_service_available?}. - # - # ## About ProfilerService - # - # Manage the collection of continuous profiling data provided by profiling - # agents running in the cloud or by an offline provider of profiling data. - # - # __The APIs listed in this service are intended for use within our profiler - # agents only.__ - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.profiler_service version: :v2, transport: :grpc, &block - require "google/cloud/profiler/#{version.to_s.downcase}" - - package_name = Google::Cloud::Profiler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Profiler.const_get(package_name).const_get(:ProfilerService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ProfilerService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Profiler.profiler_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ProfilerService service, - # or if the versioned client gem needs an update to support the ProfilerService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.profiler_service_available? version: :v2, transport: :grpc - require "google/cloud/profiler/#{version.to_s.downcase}" - package_name = Google::Cloud::Profiler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Profiler.const_get package_name - return false unless service_module.const_defined? :ProfilerService - service_module = service_module.const_get :ProfilerService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ExportService. - # - # By default, this returns an instance of - # [Google::Cloud::Profiler::V2::ExportService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ExportService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ExportService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Profiler.export_service_available?}. - # - # ## About ExportService - # - # Service allows existing Cloud Profiler customers to export their profile data - # out of Google Cloud. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.export_service version: :v2, transport: :grpc, &block - require "google/cloud/profiler/#{version.to_s.downcase}" - - package_name = Google::Cloud::Profiler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Profiler.const_get(package_name).const_get(:ExportService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ExportService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Profiler.export_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ExportService service, - # or if the versioned client gem needs an update to support the ExportService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.export_service_available? version: :v2, transport: :grpc - require "google/cloud/profiler/#{version.to_s.downcase}" - package_name = Google::Cloud::Profiler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Profiler.const_get package_name - return false unless service_module.const_defined? :ExportService - service_module = service_module.const_get :ExportService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-profiler library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.profiler if block_given? - - ::Google::Cloud.configure.profiler - end - end - end -end - -helper_path = ::File.join __dir__, "profiler", "helpers.rb" -require "google/cloud/profiler/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb b/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.rb deleted file mode 100644 index ae845b29de7a..000000000000 --- a/owl-bot-staging/google-cloud-profiler/lib/google/cloud/profiler/version.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! - - -module Google - module Cloud - module Profiler - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.rb deleted file mode 100644 index e3a0d1dcc342..000000000000 --- a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/client_test.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! - -require "helper" -require "google/cloud/profiler" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Profiler::ClientConstructionMinitest < 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_profiler_service_grpc - skip unless Google::Cloud::Profiler.profiler_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Profiler.profiler_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Profiler::V2::ProfilerService::Client, client - end - end - - def test_profiler_service_rest - skip unless Google::Cloud::Profiler.profiler_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Profiler.profiler_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Profiler::V2::ProfilerService::Rest::Client, client - end - end - - def test_export_service_grpc - skip unless Google::Cloud::Profiler.export_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Profiler.export_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Profiler::V2::ExportService::Client, client - end - end - - def test_export_service_rest - skip unless Google::Cloud::Profiler.export_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Profiler.export_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Profiler::V2::ExportService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb b/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.rb deleted file mode 100644 index 19e7626008b0..000000000000 --- a/owl-bot-staging/google-cloud-profiler/test/google/cloud/profiler/version_test.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 "helper" -require "google/cloud/profiler/version" - -class Google::Cloud::Profiler::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Profiler::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-profiler/test/helper.rb b/owl-bot-staging/google-cloud-profiler/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-profiler/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore b/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json b/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json deleted file mode 100644 index b1587db22543..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "rapidmigrationassessment.googleapis.com", - "api_shortname": "rapidmigrationassessment", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment/latest", - "distribution_name": "google-cloud-rapid_migration_assessment", - "is_cloud": true, - "language": "ruby", - "name": "rapidmigrationassessment", - "name_pretty": "Rapid Migration Assessment API", - "product_documentation": "https://cloud.google.com/migration-center/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Rapid Migration Assessment service is our first-party migration assessment and planning tool.", - "ruby-cloud-product-url": "https://cloud.google.com/migration-center/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml b/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml deleted file mode 100644 index d4a47aeea4fa..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-rapid_migration_assessment.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-rapid_migration_assessment.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/.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-rapid_migration_assessment/.yardopts b/owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts deleted file mode 100644 index 1fcbd04b5c20..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Rapid Migration Assessment API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md deleted file mode 100644 index 90c88f61aadb..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-rapid_migration_assessment 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-rapid_migration_assessment 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/rapid_migration_assessment" - -client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/rapid_migration_assessment" - -Google::Cloud::RapidMigrationAssessment.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment -``` - -### 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-rapid_migration_assessment -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/rapid_migration_assessment" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment -``` - -### 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-rapid_migration_assessment/CHANGELOG.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile b/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile deleted file mode 100644 index 2c9d94368a6e..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-rapid_migration_assessment-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-rapid_migration_assessment.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/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-rapid_migration_assessment/README.md b/owl-bot-staging/google-cloud-rapid_migration_assessment/README.md deleted file mode 100644 index 1b8f804a8609..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Rapid Migration Assessment API - -The Rapid Migration Assessment service is our first-party migration assessment and planning tool. - -The Rapid Migration Assessment service is our first-party migration assessment and planning tool. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-rapid_migration_assessment-v*`. -The gem `google-cloud-rapid_migration_assessment` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment/latest) -for this library, google-cloud-rapid_migration_assessment, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-rapid_migration_assessment-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/migration-center/docs) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-rapid_migration_assessment -``` - -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/rapidmigrationassessment.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/rapid_migration_assessment" - -client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment -request = ::Google::Cloud::RapidMigrationAssessment::V1::CreateCollectorRequest.new # (request fields as keyword arguments...) -response = client.create_collector request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-rapid_migration_assessment-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-rapid_migration_assessment`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-rapid_migration_assessment-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-rapid_migration_assessment`. -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-rapid_migration_assessment-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-rapid_migration_assessment/Rakefile b/owl-bot-staging/google-cloud-rapid_migration_assessment/Rakefile deleted file mode 100644 index a4f6110ae221..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/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 = true -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-rapid_migration_assessment 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/rapid_migration_assessment/v1/rapid_migration_assessment/credentials" - ::Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-rapid_migration_assessment" - header "google-cloud-rapid_migration_assessment rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-rapid_migration_assessment yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment 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-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec b/owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec deleted file mode 100644 index 735d3f3a6094..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/google-cloud-rapid_migration_assessment.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/rapid_migration_assessment/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-rapid_migration_assessment" - gem.version = Google::Cloud::RapidMigrationAssessment::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Rapid Migration Assessment service is our first-party migration assessment and planning tool." - gem.summary = "The Rapid Migration Assessment service is our first-party migration assessment and planning tool." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-rapid_migration_assessment-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb deleted file mode 100644 index e24e54ee8658..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google-cloud-rapid_migration_assessment.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/rapid_migration_assessment" unless defined? Google::Cloud::RapidMigrationAssessment::VERSION diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb deleted file mode 100644 index 3497a0fa20f8..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/rapid_migration_assessment/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :rapid_migration_assessment do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module RapidMigrationAssessment - ## - # Create a new client object for RapidMigrationAssessment. - # - # By default, this returns an instance of - # [Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-rapid_migration_assessment-v1/latest/Google-Cloud-RapidMigrationAssessment-V1-RapidMigrationAssessment-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the RapidMigrationAssessment service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the RapidMigrationAssessment service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available?}. - # - # ## About RapidMigrationAssessment - # - # Service describing handlers for resources. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.rapid_migration_assessment version: :v1, transport: :grpc, &block - require "google/cloud/rapid_migration_assessment/#{version.to_s.downcase}" - - package_name = Google::Cloud::RapidMigrationAssessment - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RapidMigrationAssessment.const_get(package_name).const_get(:RapidMigrationAssessment) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the RapidMigrationAssessment service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the RapidMigrationAssessment service, - # or if the versioned client gem needs an update to support the RapidMigrationAssessment service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.rapid_migration_assessment_available? version: :v1, transport: :grpc - require "google/cloud/rapid_migration_assessment/#{version.to_s.downcase}" - package_name = Google::Cloud::RapidMigrationAssessment - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RapidMigrationAssessment.const_get package_name - return false unless service_module.const_defined? :RapidMigrationAssessment - service_module = service_module.const_get :RapidMigrationAssessment - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-rapid_migration_assessment library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.rapid_migration_assessment if block_given? - - ::Google::Cloud.configure.rapid_migration_assessment - end - end - end -end - -helper_path = ::File.join __dir__, "rapid_migration_assessment", "helpers.rb" -require "google/cloud/rapid_migration_assessment/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.rb deleted file mode 100644 index 8be3c821a1fd..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/lib/google/cloud/rapid_migration_assessment/version.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! - - -module Google - module Cloud - module RapidMigrationAssessment - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb deleted file mode 100644 index 705fb490d739..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/rapid_migration_assessment" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::RapidMigrationAssessment::ClientConstructionMinitest < 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_rapid_migration_assessment_grpc - skip unless Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Client, client - end - end - - def test_rapid_migration_assessment_rest - skip unless Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::RapidMigrationAssessment.rapid_migration_assessment transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::RapidMigrationAssessment::V1::RapidMigrationAssessment::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.rb deleted file mode 100644 index 61766b818718..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/google/cloud/rapid_migration_assessment/version_test.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 "helper" -require "google/cloud/rapid_migration_assessment/version" - -class Google::Cloud::RapidMigrationAssessment::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::RapidMigrationAssessment::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb b/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-rapid_migration_assessment/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore b/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json b/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json deleted file mode 100644 index 35ab06056f92..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "recaptchaenterprise.googleapis.com", - "api_shortname": "recaptchaenterprise", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise/latest", - "distribution_name": "google-cloud-recaptcha_enterprise", - "is_cloud": true, - "language": "ruby", - "name": "recaptchaenterprise", - "name_pretty": "reCAPTCHA Enterprise API", - "product_documentation": "https://cloud.google.com/recaptcha-enterprise", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "reCAPTCHA Enterprise is a service that protects your site from spam and abuse.", - "ruby-cloud-env-prefix": "RECAPTCHA_ENTERPRISE", - "ruby-cloud-product-url": "https://cloud.google.com/recaptcha-enterprise", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml b/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml deleted file mode 100644 index fcb7a91bebac..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-recaptcha_enterprise.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-recaptcha_enterprise.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/.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-recaptcha_enterprise/.yardopts b/owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts deleted file mode 100644 index 3e6ecd16105e..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="reCAPTCHA Enterprise API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md deleted file mode 100644 index 40c7c6576a97..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-recaptcha_enterprise 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-recaptcha_enterprise 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/recaptcha_enterprise" - -client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/recaptcha_enterprise" - -Google::Cloud::RecaptchaEnterprise.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service -``` - -### 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-recaptcha_enterprise -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/recaptcha_enterprise" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service -``` - -### 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-recaptcha_enterprise/CHANGELOG.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile b/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile deleted file mode 100644 index d08328f1bac2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-recaptcha_enterprise-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recaptcha_enterprise.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/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-recaptcha_enterprise/README.md b/owl-bot-staging/google-cloud-recaptcha_enterprise/README.md deleted file mode 100644 index 32e3552def3b..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the reCAPTCHA Enterprise API - -API Client library for the reCAPTCHA Enterprise API - -reCAPTCHA Enterprise is a service that protects your site from spam and abuse. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-recaptcha_enterprise-v*`. -The gem `google-cloud-recaptcha_enterprise` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise/latest) -for this library, google-cloud-recaptcha_enterprise, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-recaptcha_enterprise -``` - -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/recaptchaenterprise.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/recaptcha_enterprise" - -client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service -request = ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new # (request fields as keyword arguments...) -response = client.create_assessment request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-recaptcha_enterprise`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-recaptcha_enterprise-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-recaptcha_enterprise`. -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-recaptcha_enterprise-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-recaptcha_enterprise/Rakefile b/owl-bot-staging/google-cloud-recaptcha_enterprise/Rakefile deleted file mode 100644 index 8801ccc811f1..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/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 = true -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-recaptcha_enterprise acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["RECAPTCHA_ENTERPRISE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["RECAPTCHA_ENTERPRISE_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 RECAPTCHA_ENTERPRISE_TEST_PROJECT=test123 RECAPTCHA_ENTERPRISE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials" - ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["RECAPTCHA_ENTERPRISE_PROJECT"] = project - ENV["RECAPTCHA_ENTERPRISE_TEST_PROJECT"] = project - ENV["RECAPTCHA_ENTERPRISE_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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-recaptcha_enterprise" - header "google-cloud-recaptcha_enterprise rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-recaptcha_enterprise yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise 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-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec b/owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec deleted file mode 100644 index 52b89ec93be3..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/google-cloud-recaptcha_enterprise.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/recaptcha_enterprise/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-recaptcha_enterprise" - gem.version = Google::Cloud::RecaptchaEnterprise::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "reCAPTCHA Enterprise is a service that protects your site from spam and abuse." - gem.summary = "API Client library for the reCAPTCHA Enterprise 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-recaptcha_enterprise-v1", "~> 1.6" -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb deleted file mode 100644 index 7a2eb0be3ece..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google-cloud-recaptcha_enterprise.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/recaptcha_enterprise" unless defined? Google::Cloud::RecaptchaEnterprise::VERSION diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.rb deleted file mode 100644 index feac7c465136..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/recaptcha_enterprise/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :recaptcha_enterprise do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module RecaptchaEnterprise - ## - # Create a new client object for RecaptchaEnterpriseService. - # - # By default, this returns an instance of - # [Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest/Google-Cloud-RecaptchaEnterprise-V1-RecaptchaEnterpriseService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the RecaptchaEnterpriseService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the RecaptchaEnterpriseService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service_available?}. - # - # ## About RecaptchaEnterpriseService - # - # Service to determine the likelihood an event is legitimate. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [::Object] A client object for the specified version. - # - def self.recaptcha_enterprise_service version: :v1, &block - require "google/cloud/recaptcha_enterprise/#{version.to_s.downcase}" - - package_name = Google::Cloud::RecaptchaEnterprise - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RecaptchaEnterprise.const_get(package_name).const_get(:RecaptchaEnterpriseService) - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the RecaptchaEnterpriseService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the RecaptchaEnterpriseService service, - # or if the versioned client gem needs an update to support the RecaptchaEnterpriseService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [boolean] Whether the service is available. - # - def self.recaptcha_enterprise_service_available? version: :v1 - require "google/cloud/recaptcha_enterprise/#{version.to_s.downcase}" - package_name = Google::Cloud::RecaptchaEnterprise - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RecaptchaEnterprise.const_get package_name - return false unless service_module.const_defined? :RecaptchaEnterpriseService - service_module = service_module.const_get :RecaptchaEnterpriseService - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-recaptcha_enterprise library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.recaptcha_enterprise if block_given? - - ::Google::Cloud.configure.recaptcha_enterprise - end - end - end -end - -helper_path = ::File.join __dir__, "recaptcha_enterprise", "helpers.rb" -require "google/cloud/recaptcha_enterprise/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.rb deleted file mode 100644 index 874783301b52..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/lib/google/cloud/recaptcha_enterprise/version.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! - - -module Google - module Cloud - module RecaptchaEnterprise - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.rb deleted file mode 100644 index 8875f83e7aff..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/client_test.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 "helper" -require "google/cloud/recaptcha_enterprise" -require "gapic/common" -require "gapic/grpc" - -class Google::Cloud::RecaptchaEnterprise::ClientConstructionMinitest < 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_recaptcha_enterprise_service_grpc - skip unless Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service_available? - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.rb deleted file mode 100644 index cfc6497f1d9b..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/google/cloud/recaptcha_enterprise/version_test.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 "helper" -require "google/cloud/recaptcha_enterprise/version" - -class Google::Cloud::RecaptchaEnterprise::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::RecaptchaEnterprise::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb b/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-recaptcha_enterprise/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.gitignore b/owl-bot-staging/google-cloud-recommendation_engine/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json b/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json deleted file mode 100644 index b39e1c10e46c..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "recommendationengine.googleapis.com", - "api_shortname": "recommendationengine", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine/latest", - "distribution_name": "google-cloud-recommendation_engine", - "is_cloud": true, - "language": "ruby", - "name": "recommendationengine", - "name_pretty": "Recommendations AI API", - "product_documentation": "https://cloud.google.com/recommendations", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems.", - "ruby-cloud-env-prefix": "RECOMMENDATION_ENGINE", - "ruby-cloud-product-url": "https://cloud.google.com/recommendations", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml b/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml deleted file mode 100644 index c4f711187121..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-recommendation_engine.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-recommendation_engine.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/.toys.rb b/owl-bot-staging/google-cloud-recommendation_engine/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/.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-recommendation_engine/.yardopts b/owl-bot-staging/google-cloud-recommendation_engine/.yardopts deleted file mode 100644 index 31cc53ded05b..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Recommendations AI API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md deleted file mode 100644 index c225dd7f867a..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-recommendation_engine 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-recommendation_engine 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/recommendation_engine" - -client = Google::Cloud::RecommendationEngine.catalog_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/recommendation_engine" - -Google::Cloud::RecommendationEngine.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::RecommendationEngine.catalog_service -``` - -### 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-recommendation_engine -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/recommendation_engine" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::RecommendationEngine.catalog_service -``` - -### 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-recommendation_engine/CHANGELOG.md b/owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-recommendation_engine/Gemfile b/owl-bot-staging/google-cloud-recommendation_engine/Gemfile deleted file mode 100644 index 977763624f4a..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-recommendation_engine-v1beta1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recommendation_engine.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md b/owl-bot-staging/google-cloud-recommendation_engine/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/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-recommendation_engine/README.md b/owl-bot-staging/google-cloud-recommendation_engine/README.md deleted file mode 100644 index 2f635550baa4..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Recommendations AI API - -API Client library for the Recommendations AI API - -Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-recommendation_engine-v*`. -The gem `google-cloud-recommendation_engine` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine/latest) -for this library, google-cloud-recommendation_engine, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-recommendation_engine-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest). - -See also the [Product Documentation](https://cloud.google.com/recommendations) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-recommendation_engine -``` - -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/recommendationengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/recommendation_engine" - -client = Google::Cloud::RecommendationEngine.catalog_service -request = ::Google::Cloud::RecommendationEngine::V1beta1::CreateCatalogItemRequest.new # (request fields as keyword arguments...) -response = client.create_catalog_item request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-recommendation_engine-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-recommendation_engine`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-recommendation_engine-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-recommendation_engine`. -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-recommendation_engine-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-recommendation_engine/Rakefile b/owl-bot-staging/google-cloud-recommendation_engine/Rakefile deleted file mode 100644 index 3a827aff4b13..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/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 = true -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-recommendation_engine acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["RECOMMENDATION_ENGINE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["RECOMMENDATION_ENGINE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["RECOMMENDATION_ENGINE_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 RECOMMENDATION_ENGINE_TEST_PROJECT=test123 RECOMMENDATION_ENGINE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/recommendation_engine/v1beta1/catalog_service/credentials" - ::Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["RECOMMENDATION_ENGINE_PROJECT"] = project - ENV["RECOMMENDATION_ENGINE_TEST_PROJECT"] = project - ENV["RECOMMENDATION_ENGINE_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-recommendation_engine 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-recommendation_engine 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-recommendation_engine 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-recommendation_engine gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-recommendation_engine" - header "google-cloud-recommendation_engine rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-recommendation_engine yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-recommendation_engine 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-recommendation_engine 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-recommendation_engine 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-recommendation_engine/google-cloud-recommendation_engine.gemspec b/owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec deleted file mode 100644 index 48a314b398b7..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/google-cloud-recommendation_engine.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/recommendation_engine/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-recommendation_engine" - gem.version = Google::Cloud::RecommendationEngine::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Recommendations AI enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems." - gem.summary = "API Client library for the Recommendations AI 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-recommendation_engine-v1beta1", ">= 0.8", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb deleted file mode 100644 index afc81d0994a6..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/lib/google-cloud-recommendation_engine.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/recommendation_engine" unless defined? Google::Cloud::RecommendationEngine::VERSION diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb deleted file mode 100644 index bf98c7f7d3aa..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine.rb +++ /dev/null @@ -1,371 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/recommendation_engine/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :recommendation_engine do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module RecommendationEngine - ## - # Create a new client object for CatalogService. - # - # By default, this returns an instance of - # [Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-CatalogService-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CatalogService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CatalogService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RecommendationEngine.catalog_service_available?}. - # - # ## About CatalogService - # - # Service for ingesting catalog information of the customer's website. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.catalog_service version: :v1beta1, transport: :grpc, &block - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:CatalogService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CatalogService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.catalog_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CatalogService service, - # or if the versioned client gem needs an update to support the CatalogService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.catalog_service_available? version: :v1beta1, transport: :grpc - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RecommendationEngine.const_get package_name - return false unless service_module.const_defined? :CatalogService - service_module = service_module.const_get :CatalogService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for PredictionApiKeyRegistry. - # - # By default, this returns an instance of - # [Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-PredictionApiKeyRegistry-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the PredictionApiKeyRegistry service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the PredictionApiKeyRegistry service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RecommendationEngine.prediction_api_key_registry_available?}. - # - # ## About PredictionApiKeyRegistry - # - # Service for registering API keys for use with the `predict` method. If you - # use an API key to request predictions, you must first register the API key. - # Otherwise, your prediction request is rejected. If you use OAuth to - # authenticate your `predict` method call, you do not need to register an API - # key. You can register up to 20 API keys per project. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.prediction_api_key_registry version: :v1beta1, transport: :grpc, &block - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:PredictionApiKeyRegistry) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the PredictionApiKeyRegistry service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.prediction_api_key_registry}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the PredictionApiKeyRegistry service, - # or if the versioned client gem needs an update to support the PredictionApiKeyRegistry service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.prediction_api_key_registry_available? version: :v1beta1, transport: :grpc - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RecommendationEngine.const_get package_name - return false unless service_module.const_defined? :PredictionApiKeyRegistry - service_module = service_module.const_get :PredictionApiKeyRegistry - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for PredictionService. - # - # By default, this returns an instance of - # [Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-PredictionService-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the PredictionService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the PredictionService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RecommendationEngine.prediction_service_available?}. - # - # ## About PredictionService - # - # Service for making recommendation prediction. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.prediction_service version: :v1beta1, transport: :grpc, &block - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:PredictionService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the PredictionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.prediction_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the PredictionService service, - # or if the versioned client gem needs an update to support the PredictionService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.prediction_service_available? version: :v1beta1, transport: :grpc - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RecommendationEngine.const_get package_name - return false unless service_module.const_defined? :PredictionService - service_module = service_module.const_get :PredictionService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for UserEventService. - # - # By default, this returns an instance of - # [Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-UserEventService-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the UserEventService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the UserEventService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::RecommendationEngine.user_event_service_available?}. - # - # ## About UserEventService - # - # Service for ingesting end user actions on the customer website. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.user_event_service version: :v1beta1, transport: :grpc, &block - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::RecommendationEngine.const_get(package_name).const_get(:UserEventService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the UserEventService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::RecommendationEngine.user_event_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the UserEventService service, - # or if the versioned client gem needs an update to support the UserEventService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.user_event_service_available? version: :v1beta1, transport: :grpc - require "google/cloud/recommendation_engine/#{version.to_s.downcase}" - package_name = Google::Cloud::RecommendationEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::RecommendationEngine.const_get package_name - return false unless service_module.const_defined? :UserEventService - service_module = service_module.const_get :UserEventService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-recommendation_engine library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.recommendation_engine if block_given? - - ::Google::Cloud.configure.recommendation_engine - end - end - end -end - -helper_path = ::File.join __dir__, "recommendation_engine", "helpers.rb" -require "google/cloud/recommendation_engine/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb b/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.rb deleted file mode 100644 index ab6d2e72fa21..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/lib/google/cloud/recommendation_engine/version.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! - - -module Google - module Cloud - module RecommendationEngine - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.rb deleted file mode 100644 index f582f7064a11..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/client_test.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! - -require "helper" -require "google/cloud/recommendation_engine" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::RecommendationEngine::ClientConstructionMinitest < 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_catalog_service_grpc - skip unless Google::Cloud::RecommendationEngine.catalog_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RecommendationEngine.catalog_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Client, client - end - end - - def test_catalog_service_rest - skip unless Google::Cloud::RecommendationEngine.catalog_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::RecommendationEngine.catalog_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client, client - end - end - - def test_prediction_api_key_registry_grpc - skip unless Google::Cloud::RecommendationEngine.prediction_api_key_registry_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RecommendationEngine.prediction_api_key_registry transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Client, client - end - end - - def test_prediction_api_key_registry_rest - skip unless Google::Cloud::RecommendationEngine.prediction_api_key_registry_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::RecommendationEngine.prediction_api_key_registry transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::Client, client - end - end - - def test_prediction_service_grpc - skip unless Google::Cloud::RecommendationEngine.prediction_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RecommendationEngine.prediction_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client, client - end - end - - def test_prediction_service_rest - skip unless Google::Cloud::RecommendationEngine.prediction_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::RecommendationEngine.prediction_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Rest::Client, client - end - end - - def test_user_event_service_grpc - skip unless Google::Cloud::RecommendationEngine.user_event_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::RecommendationEngine.user_event_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client, client - end - end - - def test_user_event_service_rest - skip unless Google::Cloud::RecommendationEngine.user_event_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::RecommendationEngine.user_event_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.rb deleted file mode 100644 index fd4e833d1a0e..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/test/google/cloud/recommendation_engine/version_test.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 "helper" -require "google/cloud/recommendation_engine/version" - -class Google::Cloud::RecommendationEngine::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::RecommendationEngine::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb b/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-recommendation_engine/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-recommender/.gitignore b/owl-bot-staging/google-cloud-recommender/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-recommender/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-recommender/.repo-metadata.json b/owl-bot-staging/google-cloud-recommender/.repo-metadata.json deleted file mode 100644 index 9069bad13eac..000000000000 --- a/owl-bot-staging/google-cloud-recommender/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "recommender.googleapis.com", - "api_shortname": "recommender", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-recommender/latest", - "distribution_name": "google-cloud-recommender", - "is_cloud": true, - "language": "ruby", - "name": "recommender", - "name_pretty": "Recommender API", - "product_documentation": "https://cloud.google.com/recommender", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services.", - "ruby-cloud-env-prefix": "RECOMMENDER", - "ruby-cloud-product-url": "https://cloud.google.com/recommender", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-recommender/.rubocop.yml b/owl-bot-staging/google-cloud-recommender/.rubocop.yml deleted file mode 100644 index 7215da5958f1..000000000000 --- a/owl-bot-staging/google-cloud-recommender/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-recommender.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-recommender.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-recommender/.toys.rb b/owl-bot-staging/google-cloud-recommender/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-recommender/.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-recommender/.yardopts b/owl-bot-staging/google-cloud-recommender/.yardopts deleted file mode 100644 index 06acaa595a14..000000000000 --- a/owl-bot-staging/google-cloud-recommender/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Recommender API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md b/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md deleted file mode 100644 index f4a097096b14..000000000000 --- a/owl-bot-staging/google-cloud-recommender/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-recommender 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-recommender 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/recommender" - -client = Google::Cloud::Recommender.recommender_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/recommender" - -Google::Cloud::Recommender.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Recommender.recommender_service -``` - -### 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-recommender -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/recommender" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Recommender.recommender_service -``` - -### 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-recommender/CHANGELOG.md b/owl-bot-staging/google-cloud-recommender/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-recommender/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-recommender/Gemfile b/owl-bot-staging/google-cloud-recommender/Gemfile deleted file mode 100644 index 0b6d1ac9b148..000000000000 --- a/owl-bot-staging/google-cloud-recommender/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-recommender-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-recommender.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-recommender/LICENSE.md b/owl-bot-staging/google-cloud-recommender/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-recommender/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-recommender/README.md b/owl-bot-staging/google-cloud-recommender/README.md deleted file mode 100644 index 30598549f911..000000000000 --- a/owl-bot-staging/google-cloud-recommender/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Recommender API - -API Client library for the Recommender API - -Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-recommender-v*`. -The gem `google-cloud-recommender` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender/latest) -for this library, google-cloud-recommender, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-recommender-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/recommender) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-recommender -``` - -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/recommender.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/recommender" - -client = Google::Cloud::Recommender.recommender_service -request = ::Google::Cloud::Recommender::V1::ListInsightsRequest.new # (request fields as keyword arguments...) -response = client.list_insights request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-recommender-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-recommender`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-recommender-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-recommender`. -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-recommender-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-recommender/Rakefile b/owl-bot-staging/google-cloud-recommender/Rakefile deleted file mode 100644 index c04db1ffb5eb..000000000000 --- a/owl-bot-staging/google-cloud-recommender/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 = true -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-recommender acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["RECOMMENDER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["RECOMMENDER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["RECOMMENDER_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 RECOMMENDER_TEST_PROJECT=test123 RECOMMENDER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/recommender/v1/recommender/credentials" - ::Google::Cloud::Recommender::V1::Recommender::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["RECOMMENDER_PROJECT"] = project - ENV["RECOMMENDER_TEST_PROJECT"] = project - ENV["RECOMMENDER_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-recommender 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-recommender 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-recommender 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-recommender gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-recommender" - header "google-cloud-recommender rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-recommender yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-recommender 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-recommender 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-recommender 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-recommender/google-cloud-recommender.gemspec b/owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec deleted file mode 100644 index a81067d3b920..000000000000 --- a/owl-bot-staging/google-cloud-recommender/google-cloud-recommender.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/recommender/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-recommender" - gem.version = Google::Cloud::Recommender::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services." - gem.summary = "API Client library for the Recommender 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-recommender-v1", ">= 0.17", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb b/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb deleted file mode 100644 index ac3b14c26b03..000000000000 --- a/owl-bot-staging/google-cloud-recommender/lib/google-cloud-recommender.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/recommender" unless defined? Google::Cloud::Recommender::VERSION diff --git a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb deleted file mode 100644 index 6588abd6e9a0..000000000000 --- a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/recommender/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :recommender do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Recommender - ## - # Create a new client object for Recommender. - # - # By default, this returns an instance of - # [Google::Cloud::Recommender::V1::Recommender::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommender-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Recommender service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Recommender service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Recommender.recommender_service_available?}. - # - # ## About Recommender - # - # Provides insights and recommendations for cloud customers for various - # categories like performance optimization, cost savings, reliability, feature - # discovery, etc. Insights and recommendations are generated automatically - # based on analysis of user resources, configuration and monitoring metrics. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.recommender_service version: :v1, transport: :grpc, &block - require "google/cloud/recommender/#{version.to_s.downcase}" - - package_name = Google::Cloud::Recommender - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Recommender.const_get(package_name).const_get(:Recommender) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Recommender service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Recommender.recommender_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Recommender service, - # or if the versioned client gem needs an update to support the Recommender service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.recommender_service_available? version: :v1, transport: :grpc - require "google/cloud/recommender/#{version.to_s.downcase}" - package_name = Google::Cloud::Recommender - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Recommender.const_get package_name - return false unless service_module.const_defined? :Recommender - service_module = service_module.const_get :Recommender - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-recommender library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.recommender if block_given? - - ::Google::Cloud.configure.recommender - end - end - end -end - -helper_path = ::File.join __dir__, "recommender", "helpers.rb" -require "google/cloud/recommender/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb b/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.rb deleted file mode 100644 index 7e2bc1ccb49e..000000000000 --- a/owl-bot-staging/google-cloud-recommender/lib/google/cloud/recommender/version.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! - - -module Google - module Cloud - module Recommender - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb deleted file mode 100644 index c7303bf4879a..000000000000 --- a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/recommender" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Recommender::ClientConstructionMinitest < 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_recommender_service_grpc - skip unless Google::Cloud::Recommender.recommender_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Recommender.recommender_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Recommender::V1::Recommender::Client, client - end - end - - def test_recommender_service_rest - skip unless Google::Cloud::Recommender.recommender_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Recommender.recommender_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Recommender::V1::Recommender::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb b/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.rb deleted file mode 100644 index c28abec8aed6..000000000000 --- a/owl-bot-staging/google-cloud-recommender/test/google/cloud/recommender/version_test.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 "helper" -require "google/cloud/recommender/version" - -class Google::Cloud::Recommender::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Recommender::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-recommender/test/helper.rb b/owl-bot-staging/google-cloud-recommender/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-recommender/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-redis-cluster/.gitignore b/owl-bot-staging/google-cloud-redis-cluster/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json b/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json deleted file mode 100644 index a4eacf09bd79..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "redis.googleapis.com", - "api_shortname": "redis", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster/latest", - "distribution_name": "google-cloud-redis-cluster", - "is_cloud": true, - "language": "ruby", - "name": "redis", - "name_pretty": "Google Cloud Memorystore for Redis API", - "product_documentation": "https://cloud.google.com/memorystore/docs/cluster", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Creates and manages Redis instances on the Google Cloud Platform.", - "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/cluster", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml b/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml deleted file mode 100644 index fb84f9ce2d5d..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-redis-cluster.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-redis-cluster.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-redis-cluster/.toys.rb b/owl-bot-staging/google-cloud-redis-cluster/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/.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-redis-cluster/.yardopts b/owl-bot-staging/google-cloud-redis-cluster/.yardopts deleted file mode 100644 index 99a35e32f21f..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Google Cloud Memorystore for Redis API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md b/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md deleted file mode 100644 index b6045d2796c1..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-redis-cluster 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-redis-cluster 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/redis/cluster" - -client = Google::Cloud::Redis::Cluster.cloud_redis_cluster do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/redis/cluster" - -Google::Cloud::Redis::Cluster.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Redis::Cluster.cloud_redis_cluster -``` - -### 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-redis-cluster -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/redis/cluster" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Redis::Cluster.cloud_redis_cluster -``` - -### 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-redis-cluster/CHANGELOG.md b/owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-redis-cluster/Gemfile b/owl-bot-staging/google-cloud-redis-cluster/Gemfile deleted file mode 100644 index 8358ea525575..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-redis-cluster-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-redis-cluster.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-redis-cluster/LICENSE.md b/owl-bot-staging/google-cloud-redis-cluster/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/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-redis-cluster/README.md b/owl-bot-staging/google-cloud-redis-cluster/README.md deleted file mode 100644 index 18d1556da6de..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Ruby Client for the Google Cloud Memorystore for Redis API - -Creates and manages Redis instances on the Google Cloud Platform. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-redis-cluster-v*`. -The gem `google-cloud-redis-cluster` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster/latest) -for this library, google-cloud-redis-cluster, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-redis-cluster-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/memorystore/docs/cluster) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-redis-cluster -``` - -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/redis.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/redis/cluster" - -client = Google::Cloud::Redis::Cluster.cloud_redis_cluster -request = ::Google::Cloud::Redis::Cluster::V1::ListClustersRequest.new # (request fields as keyword arguments...) -response = client.list_clusters request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-redis-cluster-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-redis-cluster`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-redis-cluster-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-redis-cluster`. -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-redis-cluster-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-redis-cluster/Rakefile b/owl-bot-staging/google-cloud-redis-cluster/Rakefile deleted file mode 100644 index 2738a728b0eb..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/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 = true -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-redis-cluster 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/redis/cluster/v1/cloud_redis_cluster/credentials" - ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::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-redis-cluster 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-redis-cluster 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-redis-cluster 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-redis-cluster gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-redis-cluster" - header "google-cloud-redis-cluster rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-redis-cluster yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-redis-cluster 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-redis-cluster 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-redis-cluster 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-redis-cluster/google-cloud-redis-cluster.gemspec b/owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec deleted file mode 100644 index 1f65804ae2de..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/google-cloud-redis-cluster.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/redis/cluster/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-redis-cluster" - gem.version = Google::Cloud::Redis::Cluster::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Creates and manages Redis instances on the Google Cloud Platform." - gem.summary = "Creates and manages Redis instances on the 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-redis-cluster-v1", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb deleted file mode 100644 index 32acf287e53b..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/lib/google-cloud-redis-cluster.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/redis/cluster" unless defined? Google::Cloud::Redis::Cluster::VERSION diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb deleted file mode 100644 index 9b8f045877fa..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster.rb +++ /dev/null @@ -1,173 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/redis/cluster/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :redis_cluster do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Redis - module Cluster - ## - # Create a new client object for CloudRedisCluster. - # - # By default, this returns an instance of - # [Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest/Google-Cloud-Redis-Cluster-V1-CloudRedisCluster-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CloudRedisCluster service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CloudRedisCluster service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Redis::Cluster.cloud_redis_cluster_available?}. - # - # ## About CloudRedisCluster - # - # Configures and manages Cloud Memorystore for Redis clusters - # - # Google Cloud Memorystore for Redis Cluster - # - # The `redis.googleapis.com` service implements the Google Cloud Memorystore - # for Redis API and defines the following resource model for managing Redis - # clusters: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of Redis clusters, named: `/clusters/*` - # * As such, Redis clusters are resources of the form: - # `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` - # - # Note that location_id must be a GCP `region`; for example: - # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis` - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.cloud_redis_cluster version: :v1, transport: :grpc, &block - require "google/cloud/redis/cluster/#{version.to_s.downcase}" - - package_name = Google::Cloud::Redis::Cluster - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Redis::Cluster.const_get(package_name).const_get(:CloudRedisCluster) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CloudRedisCluster service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Redis::Cluster.cloud_redis_cluster}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CloudRedisCluster service, - # or if the versioned client gem needs an update to support the CloudRedisCluster service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.cloud_redis_cluster_available? version: :v1, transport: :grpc - require "google/cloud/redis/cluster/#{version.to_s.downcase}" - package_name = Google::Cloud::Redis::Cluster - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Redis::Cluster.const_get package_name - return false unless service_module.const_defined? :CloudRedisCluster - service_module = service_module.const_get :CloudRedisCluster - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-redis-cluster library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.redis_cluster if block_given? - - ::Google::Cloud.configure.redis_cluster - end - end - end - end -end - -helper_path = ::File.join __dir__, "cluster", "helpers.rb" -require "google/cloud/redis/cluster/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb b/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/version.rb deleted file mode 100644 index 69afe88537e4..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/lib/google/cloud/redis/cluster/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 Redis - module Cluster - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb deleted file mode 100644 index ebe5ffde87a6..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/redis/cluster" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Redis::Cluster::ClientConstructionMinitest < 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_cloud_redis_cluster_grpc - skip unless Google::Cloud::Redis::Cluster.cloud_redis_cluster_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Redis::Cluster.cloud_redis_cluster transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client, client - end - end - - def test_cloud_redis_cluster_rest - skip unless Google::Cloud::Redis::Cluster.cloud_redis_cluster_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Redis::Cluster.cloud_redis_cluster transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb b/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.rb deleted file mode 100644 index f4255931d11b..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/test/google/cloud/redis/cluster/version_test.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 "helper" -require "google/cloud/redis/cluster/version" - -class Google::Cloud::Redis::Cluster::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Redis::Cluster::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb b/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-redis-cluster/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-redis/.gitignore b/owl-bot-staging/google-cloud-redis/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-redis/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-redis/.repo-metadata.json b/owl-bot-staging/google-cloud-redis/.repo-metadata.json deleted file mode 100644 index dcc38b4fbac7..000000000000 --- a/owl-bot-staging/google-cloud-redis/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "redis.googleapis.com", - "api_shortname": "redis", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-redis/latest", - "distribution_name": "google-cloud-redis", - "is_cloud": true, - "language": "ruby", - "name": "redis", - "name_pretty": "Google Cloud Memorystore for Redis API", - "product_documentation": "https://cloud.google.com/memorystore/docs/redis", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Creates and manages Redis instances on the Google Cloud Platform.", - "ruby-cloud-env-prefix": "REDIS", - "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/redis", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-redis/.rubocop.yml b/owl-bot-staging/google-cloud-redis/.rubocop.yml deleted file mode 100644 index 2251f5deb43a..000000000000 --- a/owl-bot-staging/google-cloud-redis/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-redis.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-redis.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-redis/.toys.rb b/owl-bot-staging/google-cloud-redis/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-redis/.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-redis/.yardopts b/owl-bot-staging/google-cloud-redis/.yardopts deleted file mode 100644 index 99a35e32f21f..000000000000 --- a/owl-bot-staging/google-cloud-redis/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Google Cloud Memorystore for Redis API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md b/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md deleted file mode 100644 index ea9c72a70bac..000000000000 --- a/owl-bot-staging/google-cloud-redis/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-redis 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-redis 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/redis" - -client = Google::Cloud::Redis.cloud_redis do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/redis" - -Google::Cloud::Redis.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Redis.cloud_redis -``` - -### 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-redis -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/redis" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Redis.cloud_redis -``` - -### 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-redis/CHANGELOG.md b/owl-bot-staging/google-cloud-redis/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-redis/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-redis/Gemfile b/owl-bot-staging/google-cloud-redis/Gemfile deleted file mode 100644 index f8ca4d7fc143..000000000000 --- a/owl-bot-staging/google-cloud-redis/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-redis-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-redis.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-redis/LICENSE.md b/owl-bot-staging/google-cloud-redis/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-redis/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-redis/README.md b/owl-bot-staging/google-cloud-redis/README.md deleted file mode 100644 index c247a9ec0259..000000000000 --- a/owl-bot-staging/google-cloud-redis/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Google Cloud Memorystore for Redis API - -API Client library for the Google Cloud Memorystore for Redis API - -Creates and manages Redis instances on the Google Cloud Platform. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-redis-v*`. -The gem `google-cloud-redis` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-redis/latest) -for this library, google-cloud-redis, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-redis -``` - -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/redis.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/redis" - -client = Google::Cloud::Redis.cloud_redis -request = ::Google::Cloud::Redis::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-redis`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-redis-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-redis`. -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-redis-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-redis/Rakefile b/owl-bot-staging/google-cloud-redis/Rakefile deleted file mode 100644 index fab25f21e041..000000000000 --- a/owl-bot-staging/google-cloud-redis/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 = true -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-redis acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["REDIS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["REDIS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["REDIS_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 REDIS_TEST_PROJECT=test123 REDIS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/redis/v1/cloud_redis/credentials" - ::Google::Cloud::Redis::V1::CloudRedis::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["REDIS_PROJECT"] = project - ENV["REDIS_TEST_PROJECT"] = project - ENV["REDIS_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-redis 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-redis 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-redis 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-redis gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-redis" - header "google-cloud-redis rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-redis yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-redis 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-redis 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-redis 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-redis/google-cloud-redis.gemspec b/owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec deleted file mode 100644 index 7cf41d0d75dd..000000000000 --- a/owl-bot-staging/google-cloud-redis/google-cloud-redis.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/redis/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-redis" - gem.version = Google::Cloud::Redis::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Creates and manages Redis instances on the Google Cloud Platform." - gem.summary = "API Client library for the Google Cloud Memorystore for Redis 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-redis-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb b/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb deleted file mode 100644 index 24f7f7efe908..000000000000 --- a/owl-bot-staging/google-cloud-redis/lib/google-cloud-redis.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/redis" unless defined? Google::Cloud::Redis::VERSION diff --git a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb deleted file mode 100644 index 369b2b1354be..000000000000 --- a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/redis/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :redis do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Redis - ## - # Create a new client object for CloudRedis. - # - # By default, this returns an instance of - # [Google::Cloud::Redis::V1::CloudRedis::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest/Google-Cloud-Redis-V1-CloudRedis-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CloudRedis service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CloudRedis service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Redis.cloud_redis_available?}. - # - # ## About CloudRedis - # - # Configures and manages Cloud Memorystore for Redis instances - # - # Google Cloud Memorystore for Redis v1 - # - # The `redis.googleapis.com` service implements the Google Cloud Memorystore - # for Redis API and defines the following resource model for managing Redis - # instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of Redis instances, named: `/instances/*` - # * As such, Redis instances are resources of the form: - # `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - # - # Note that location_id must be referring to a GCP `region`; for example: - # * `projects/redpepper-1290/locations/us-central1/instances/my-redis` - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.cloud_redis version: :v1, transport: :grpc, &block - require "google/cloud/redis/#{version.to_s.downcase}" - - package_name = Google::Cloud::Redis - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Redis.const_get(package_name).const_get(:CloudRedis) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CloudRedis service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Redis.cloud_redis}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CloudRedis service, - # or if the versioned client gem needs an update to support the CloudRedis service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.cloud_redis_available? version: :v1, transport: :grpc - require "google/cloud/redis/#{version.to_s.downcase}" - package_name = Google::Cloud::Redis - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Redis.const_get package_name - return false unless service_module.const_defined? :CloudRedis - service_module = service_module.const_get :CloudRedis - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-redis library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.redis if block_given? - - ::Google::Cloud.configure.redis - end - end - end -end - -helper_path = ::File.join __dir__, "redis", "helpers.rb" -require "google/cloud/redis/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb b/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.rb deleted file mode 100644 index cd614cdb85fc..000000000000 --- a/owl-bot-staging/google-cloud-redis/lib/google/cloud/redis/version.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! - - -module Google - module Cloud - module Redis - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb deleted file mode 100644 index 73cd355f4744..000000000000 --- a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/redis" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Redis::ClientConstructionMinitest < 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_cloud_redis_grpc - skip unless Google::Cloud::Redis.cloud_redis_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Redis.cloud_redis transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Redis::V1::CloudRedis::Client, client - end - end - - def test_cloud_redis_rest - skip unless Google::Cloud::Redis.cloud_redis_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Redis.cloud_redis transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Redis::V1::CloudRedis::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb b/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.rb deleted file mode 100644 index d762219f9508..000000000000 --- a/owl-bot-staging/google-cloud-redis/test/google/cloud/redis/version_test.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 "helper" -require "google/cloud/redis/version" - -class Google::Cloud::Redis::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Redis::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-redis/test/helper.rb b/owl-bot-staging/google-cloud-redis/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-redis/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-resource_manager/.gitignore b/owl-bot-staging/google-cloud-resource_manager/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json deleted file mode 100644 index 8a72b65aaf7b..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/.repo-metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "api_id": "cloudresourcemanager.googleapis.com", - "api_shortname": "cloudresourcemanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager/latest", - "distribution_name": "google-cloud-resource_manager", - "is_cloud": true, - "language": "ruby", - "name": "cloudresourcemanager", - "name_pretty": "Cloud Resource Manager API", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml b/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml deleted file mode 100644 index 38e7ef0201f0..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-resource_manager.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-resource_manager.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-resource_manager/.toys.rb b/owl-bot-staging/google-cloud-resource_manager/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/.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-resource_manager/.yardopts b/owl-bot-staging/google-cloud-resource_manager/.yardopts deleted file mode 100644 index f33dd0accdd3..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Resource Manager API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -MIGRATING.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md deleted file mode 100644 index a0127ab5179c..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-resource_manager 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-resource_manager 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/resource_manager" - -client = Google::Cloud::ResourceManager.folders do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/resource_manager" - -Google::Cloud::ResourceManager.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::ResourceManager.folders -``` - -### 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-resource_manager -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/resource_manager" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::ResourceManager.folders -``` - -### 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-resource_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-resource_manager/Gemfile b/owl-bot-staging/google-cloud-resource_manager/Gemfile deleted file mode 100644 index 7b834f17cdbd..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-resource_manager-v3"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-resource_manager.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-resource_manager/LICENSE.md b/owl-bot-staging/google-cloud-resource_manager/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/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-resource_manager/README.md b/owl-bot-staging/google-cloud-resource_manager/README.md deleted file mode 100644 index 5831ae2d9540..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# Ruby Client for the Cloud Resource Manager API - -Creates, reads, and updates metadata for Google Cloud Platform resource containers. - -Creates, reads, and updates metadata for Google Cloud Platform resource containers. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-resource_manager-v*`. -The gem `google-cloud-resource_manager` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager/latest) -for this library, google-cloud-resource_manager, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-resource_manager-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest). - -## Quick Start - -``` -$ gem install google-cloud-resource_manager -``` - -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/cloudresourcemanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/resource_manager" - -client = Google::Cloud::ResourceManager.folders -request = ::Google::Cloud::ResourceManager::V3::GetFolderRequest.new # (request fields as keyword arguments...) -response = client.get_folder request -``` - -## Migrating from 0.x versions - -The 1.0 release of the google-cloud-resource_manager client is a significant upgrade -based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby), -and includes substantial interface changes. Existing code written for earlier -versions of this library will likely require updates to use this version. -See the {file:MIGRATING.md MIGRATING.md} document for more 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-resource_manager-v3](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-resource_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-resource_manager-v3`. -_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-resource_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-resource_manager-v3`. - -### 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-resource_manager/Rakefile b/owl-bot-staging/google-cloud-resource_manager/Rakefile deleted file mode 100644 index 46ca31bfc501..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/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 = true -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-resource_manager 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/resource_manager/v3/folders/credentials" - ::Google::Cloud::ResourceManager::V3::Folders::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-resource_manager 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-resource_manager 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-resource_manager 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-resource_manager gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-resource_manager" - header "google-cloud-resource_manager rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-resource_manager yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-resource_manager 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-resource_manager 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-resource_manager 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-resource_manager/google-cloud-resource_manager.gemspec b/owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec deleted file mode 100644 index 9d4a1c47ebb1..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/google-cloud-resource_manager.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/resource_manager/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-resource_manager" - gem.version = Google::Cloud::ResourceManager::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Creates, reads, and updates metadata for Google Cloud Platform resource containers." - gem.summary = "Creates, reads, and updates metadata for Google Cloud Platform resource containers." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts", "MIGRATING.md"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-resource_manager-v3", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb deleted file mode 100644 index a17c3b857361..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/lib/google-cloud-resource_manager.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/resource_manager" unless defined? Google::Cloud::ResourceManager::VERSION diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb deleted file mode 100644 index 62583916a9e9..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager.rb +++ /dev/null @@ -1,584 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/resource_manager/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :resource_manager do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module ResourceManager - ## - # Create a new client object for Folders. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::Folders::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Folders-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Folders service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Folders service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.folders_available?}. - # - # ## About Folders - # - # Manages Cloud Platform folder resources. - # Folders can be used to organize the resources under an - # organization and to control the policies applied to groups of resources. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.folders version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Folders) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Folders service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.folders}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Folders service, - # or if the versioned client gem needs an update to support the Folders service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.folders_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :Folders - service_module = service_module.const_get :Folders - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Organizations. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::Organizations::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Organizations-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Organizations service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Organizations service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.organizations_available?}. - # - # ## About Organizations - # - # Allows users to manage their organization resources. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.organizations version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Organizations) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Organizations service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.organizations}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Organizations service, - # or if the versioned client gem needs an update to support the Organizations service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.organizations_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :Organizations - service_module = service_module.const_get :Organizations - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Projects. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::Projects::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-Projects-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Projects service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Projects service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.projects_available?}. - # - # ## About Projects - # - # Manages Google Cloud Projects. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.projects version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:Projects) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Projects service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.projects}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Projects service, - # or if the versioned client gem needs an update to support the Projects service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.projects_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :Projects - service_module = service_module.const_get :Projects - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for TagBindings. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::TagBindings::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagBindings-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TagBindings service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the TagBindings service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.tag_bindings_available?}. - # - # ## About TagBindings - # - # Allow users to create and manage TagBindings between TagValues and - # different Google Cloud resources throughout the GCP resource hierarchy. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.tag_bindings version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagBindings) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the TagBindings service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_bindings}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the TagBindings service, - # or if the versioned client gem needs an update to support the TagBindings service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.tag_bindings_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :TagBindings - service_module = service_module.const_get :TagBindings - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for TagHolds. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::TagHolds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagHolds-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TagHolds service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the TagHolds service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.tag_holds_available?}. - # - # ## About TagHolds - # - # Allow users to create and manage TagHolds for TagValues. TagHolds represent - # the use of a Tag Value that is not captured by TagBindings but - # should still block TagValue deletion (such as a reference in a policy - # condition). This service provides isolated failure domains by cloud location - # so that TagHolds can be managed in the same location as their usage. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.tag_holds version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagHolds) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the TagHolds service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_holds}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the TagHolds service, - # or if the versioned client gem needs an update to support the TagHolds service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.tag_holds_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :TagHolds - service_module = service_module.const_get :TagHolds - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for TagKeys. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::TagKeys::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagKeys-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TagKeys service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the TagKeys service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.tag_keys_available?}. - # - # ## About TagKeys - # - # Allow users to create and manage tag keys. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.tag_keys version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagKeys) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the TagKeys service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_keys}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the TagKeys service, - # or if the versioned client gem needs an update to support the TagKeys service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.tag_keys_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :TagKeys - service_module = service_module.const_get :TagKeys - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for TagValues. - # - # By default, this returns an instance of - # [Google::Cloud::ResourceManager::V3::TagValues::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-resource_manager-v3/latest/Google-Cloud-ResourceManager-V3-TagValues-Client) - # for a gRPC client for version V3 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the TagValues service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the TagValues service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ResourceManager.tag_values_available?}. - # - # ## About TagValues - # - # Allow users to create and manage tag values. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.tag_values version: :v3, transport: :grpc, &block - require "google/cloud/resource_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ResourceManager.const_get(package_name).const_get(:TagValues) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the TagValues service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ResourceManager.tag_values}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the TagValues service, - # or if the versioned client gem needs an update to support the TagValues service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v3`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.tag_values_available? version: :v3, transport: :grpc - require "google/cloud/resource_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::ResourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ResourceManager.const_get package_name - return false unless service_module.const_defined? :TagValues - service_module = service_module.const_get :TagValues - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-resource_manager library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.resource_manager if block_given? - - ::Google::Cloud.configure.resource_manager - end - end - end -end - -helper_path = ::File.join __dir__, "resource_manager", "helpers.rb" -require "google/cloud/resource_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb b/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.rb deleted file mode 100644 index cc2ec91f9504..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/lib/google/cloud/resource_manager/version.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! - - -module Google - module Cloud - module ResourceManager - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb deleted file mode 100644 index 76d471122b3a..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/client_test.rb +++ /dev/null @@ -1,190 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 "google/cloud/resource_manager" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::ResourceManager::ClientConstructionMinitest < 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_folders_grpc - skip unless Google::Cloud::ResourceManager.folders_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.folders transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::Folders::Client, client - end - end - - def test_folders_rest - skip unless Google::Cloud::ResourceManager.folders_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.folders transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::Folders::Rest::Client, client - end - end - - def test_organizations_grpc - skip unless Google::Cloud::ResourceManager.organizations_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.organizations transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::Organizations::Client, client - end - end - - def test_organizations_rest - skip unless Google::Cloud::ResourceManager.organizations_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.organizations transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::Organizations::Rest::Client, client - end - end - - def test_projects_grpc - skip unless Google::Cloud::ResourceManager.projects_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.projects transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::Projects::Client, client - end - end - - def test_projects_rest - skip unless Google::Cloud::ResourceManager.projects_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.projects transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::Projects::Rest::Client, client - end - end - - def test_tag_bindings_grpc - skip unless Google::Cloud::ResourceManager.tag_bindings_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.tag_bindings transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagBindings::Client, client - end - end - - def test_tag_bindings_rest - skip unless Google::Cloud::ResourceManager.tag_bindings_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.tag_bindings transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client, client - end - end - - def test_tag_holds_grpc - skip unless Google::Cloud::ResourceManager.tag_holds_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.tag_holds transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagHolds::Client, client - end - end - - def test_tag_holds_rest - skip unless Google::Cloud::ResourceManager.tag_holds_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.tag_holds transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagHolds::Rest::Client, client - end - end - - def test_tag_keys_grpc - skip unless Google::Cloud::ResourceManager.tag_keys_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.tag_keys transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagKeys::Client, client - end - end - - def test_tag_keys_rest - skip unless Google::Cloud::ResourceManager.tag_keys_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.tag_keys transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagKeys::Rest::Client, client - end - end - - def test_tag_values_grpc - skip unless Google::Cloud::ResourceManager.tag_values_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ResourceManager.tag_values transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagValues::Client, client - end - end - - def test_tag_values_rest - skip unless Google::Cloud::ResourceManager.tag_values_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ResourceManager.tag_values transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ResourceManager::V3::TagValues::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb b/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.rb deleted file mode 100644 index 23c8cdbe40ca..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/test/google/cloud/resource_manager/version_test.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 "helper" -require "google/cloud/resource_manager/version" - -class Google::Cloud::ResourceManager::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::ResourceManager::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-resource_manager/test/helper.rb b/owl-bot-staging/google-cloud-resource_manager/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-resource_manager/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-retail/.gitignore b/owl-bot-staging/google-cloud-retail/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-retail/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-retail/.repo-metadata.json b/owl-bot-staging/google-cloud-retail/.repo-metadata.json deleted file mode 100644 index 0bc7656977aa..000000000000 --- a/owl-bot-staging/google-cloud-retail/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "retail.googleapis.com", - "api_shortname": "retail", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-retail/latest", - "distribution_name": "google-cloud-retail", - "is_cloud": true, - "language": "ruby", - "name": "retail", - "name_pretty": "Retail API", - "product_documentation": "https://cloud.google.com/retail/docs/apis", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems.", - "ruby-cloud-env-prefix": "RETAIL", - "ruby-cloud-product-url": "https://cloud.google.com/retail/docs/apis", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-retail/.rubocop.yml b/owl-bot-staging/google-cloud-retail/.rubocop.yml deleted file mode 100644 index bc5a32420f48..000000000000 --- a/owl-bot-staging/google-cloud-retail/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-retail.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-retail.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-retail/.toys.rb b/owl-bot-staging/google-cloud-retail/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-retail/.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-retail/.yardopts b/owl-bot-staging/google-cloud-retail/.yardopts deleted file mode 100644 index b19814d452b7..000000000000 --- a/owl-bot-staging/google-cloud-retail/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Retail API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md b/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md deleted file mode 100644 index ad65e919dc19..000000000000 --- a/owl-bot-staging/google-cloud-retail/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-retail 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-retail 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/retail" - -client = Google::Cloud::Retail.analytics_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/retail" - -Google::Cloud::Retail.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Retail.analytics_service -``` - -### 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-retail -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/retail" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Retail.analytics_service -``` - -### 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-retail/CHANGELOG.md b/owl-bot-staging/google-cloud-retail/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-retail/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-retail/Gemfile b/owl-bot-staging/google-cloud-retail/Gemfile deleted file mode 100644 index 27a0cf18da6d..000000000000 --- a/owl-bot-staging/google-cloud-retail/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-retail-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-retail.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-retail/LICENSE.md b/owl-bot-staging/google-cloud-retail/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-retail/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-retail/README.md b/owl-bot-staging/google-cloud-retail/README.md deleted file mode 100644 index b4176b0668a2..000000000000 --- a/owl-bot-staging/google-cloud-retail/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Retail API - -API Client library for the Retail API - -Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-retail-v*`. -The gem `google-cloud-retail` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-retail/latest) -for this library, google-cloud-retail, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-retail-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest). - -See also the [Product Documentation](https://cloud.google.com/retail/docs/apis) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-retail -``` - -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/retail.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/retail" - -client = Google::Cloud::Retail.analytics_service -request = ::Google::Cloud::Retail::V2::ExportAnalyticsMetricsRequest.new # (request fields as keyword arguments...) -response = client.export_analytics_metrics request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-retail-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-retail`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-retail-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-retail`. -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-retail-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-retail/Rakefile b/owl-bot-staging/google-cloud-retail/Rakefile deleted file mode 100644 index b6f97c47d721..000000000000 --- a/owl-bot-staging/google-cloud-retail/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 = true -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-retail acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["RETAIL_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["RETAIL_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["RETAIL_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 RETAIL_TEST_PROJECT=test123 RETAIL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/retail/v2/analytics_service/credentials" - ::Google::Cloud::Retail::V2::AnalyticsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["RETAIL_PROJECT"] = project - ENV["RETAIL_TEST_PROJECT"] = project - ENV["RETAIL_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-retail 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-retail 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-retail 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-retail gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-retail" - header "google-cloud-retail rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-retail yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-retail 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-retail 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-retail 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-retail/google-cloud-retail.gemspec b/owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec deleted file mode 100644 index 4f58ffe5832a..000000000000 --- a/owl-bot-staging/google-cloud-retail/google-cloud-retail.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/retail/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-retail" - gem.version = Google::Cloud::Retail::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Retail enables you to build an end-to-end personalized recommendation system based on state-of-the-art deep learning ML models, without a need for expertise in ML or recommendation systems." - gem.summary = "API Client library for the Retail 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-retail-v2", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb b/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb deleted file mode 100644 index 5d5f31cfdc1d..000000000000 --- a/owl-bot-staging/google-cloud-retail/lib/google-cloud-retail.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/retail" unless defined? Google::Cloud::Retail::VERSION diff --git a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb deleted file mode 100644 index 2e2588f59658..000000000000 --- a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail.rb +++ /dev/null @@ -1,950 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/retail/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :retail do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Retail - ## - # Create a new client object for AnalyticsService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::AnalyticsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AnalyticsService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AnalyticsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the AnalyticsService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.analytics_service_available?}. - # - # ## About AnalyticsService - # - # Service for managing & accessing retail search business metric. - # Retail recommendation business metric is currently not available. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.analytics_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:AnalyticsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the AnalyticsService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.analytics_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the AnalyticsService service, - # or if the versioned client gem needs an update to support the AnalyticsService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.analytics_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :AnalyticsService - service_module = service_module.const_get :AnalyticsService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for CatalogService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::CatalogService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CatalogService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CatalogService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.catalog_service_available?}. - # - # ## About CatalogService - # - # Service for managing catalog configuration. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.catalog_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CatalogService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CatalogService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.catalog_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CatalogService service, - # or if the versioned client gem needs an update to support the CatalogService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.catalog_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :CatalogService - service_module = service_module.const_get :CatalogService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for CompletionService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CompletionService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CompletionService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CompletionService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.completion_service_available?}. - # - # ## About CompletionService - # - # Autocomplete service for retail. - # - # This feature is only available for users who have Retail Search enabled. - # Enable Retail Search on Cloud Console before using this feature. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.completion_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:CompletionService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CompletionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.completion_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CompletionService service, - # or if the versioned client gem needs an update to support the CompletionService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.completion_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :CompletionService - service_module = service_module.const_get :CompletionService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ControlService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ControlService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ControlService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ControlService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.control_service_available?}. - # - # ## About ControlService - # - # Service for modifying Control. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.control_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ControlService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ControlService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.control_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ControlService service, - # or if the versioned client gem needs an update to support the ControlService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.control_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :ControlService - service_module = service_module.const_get :ControlService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for SearchService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SearchService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SearchService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.search_service_available?}. - # - # ## About SearchService - # - # Service for search. - # - # This feature is only available for users who have Retail Search enabled. - # Enable Retail Search on Cloud Console before using this feature. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.search_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:SearchService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SearchService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.search_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SearchService service, - # or if the versioned client gem needs an update to support the SearchService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.search_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :SearchService - service_module = service_module.const_get :SearchService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ConversationalSearchService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::ConversationalSearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ConversationalSearchService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ConversationalSearchService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ConversationalSearchService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.conversational_search_service_available?}. - # - # ## About ConversationalSearchService - # - # Service for retail conversational search. - # - # This feature is only available for users who have Retail Conversational - # Search enabled. Enable Retail Conversational Search on Cloud Console - # before using this feature. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.conversational_search_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ConversationalSearchService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ConversationalSearchService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.conversational_search_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ConversationalSearchService service, - # or if the versioned client gem needs an update to support the ConversationalSearchService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.conversational_search_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :ConversationalSearchService - service_module = service_module.const_get :ConversationalSearchService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for GenerativeQuestionService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::GenerativeQuestionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-GenerativeQuestionService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the GenerativeQuestionService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the GenerativeQuestionService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.generative_question_service_available?}. - # - # ## About GenerativeQuestionService - # - # Service for managing LLM generated questions in search serving. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.generative_question_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:GenerativeQuestionService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the GenerativeQuestionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.generative_question_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the GenerativeQuestionService service, - # or if the versioned client gem needs an update to support the GenerativeQuestionService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.generative_question_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :GenerativeQuestionService - service_module = service_module.const_get :GenerativeQuestionService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ModelService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::ModelService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ModelService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ModelService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ModelService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.model_service_available?}. - # - # ## About ModelService - # - # Service for performing CRUD operations on models. - # Recommendation models contain all the metadata necessary to generate a set of - # models for the `Predict()` API. A model is queried - # indirectly via a ServingConfig, which associates a model with a - # given Placement (e.g. Frequently Bought Together on Home Page). - # - # This service allows you to do the following: - # - # * Initiate training of a model. - # * Pause training of an existing model. - # * List all the available models along with their metadata. - # * Control their tuning schedule. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.model_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ModelService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ModelService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.model_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ModelService service, - # or if the versioned client gem needs an update to support the ModelService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.model_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :ModelService - service_module = service_module.const_get :ModelService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for PredictionService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::PredictionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-PredictionService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the PredictionService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the PredictionService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.prediction_service_available?}. - # - # ## About PredictionService - # - # Service for making recommendation prediction. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.prediction_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:PredictionService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the PredictionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.prediction_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the PredictionService service, - # or if the versioned client gem needs an update to support the PredictionService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.prediction_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :PredictionService - service_module = service_module.const_get :PredictionService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ProductService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::ProductService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ProductService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ProductService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ProductService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.product_service_available?}. - # - # ## About ProductService - # - # Service for ingesting Product information - # of the customer's website. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.product_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ProductService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ProductService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.product_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ProductService service, - # or if the versioned client gem needs an update to support the ProductService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.product_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :ProductService - service_module = service_module.const_get :ProductService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ServingConfigService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::ServingConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ServingConfigService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ServingConfigService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ServingConfigService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.serving_config_service_available?}. - # - # ## About ServingConfigService - # - # Service for modifying ServingConfig. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.serving_config_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ServingConfigService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ServingConfigService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.serving_config_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ServingConfigService service, - # or if the versioned client gem needs an update to support the ServingConfigService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.serving_config_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :ServingConfigService - service_module = service_module.const_get :ServingConfigService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for UserEventService. - # - # By default, this returns an instance of - # [Google::Cloud::Retail::V2::UserEventService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-UserEventService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the UserEventService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the UserEventService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Retail.user_event_service_available?}. - # - # ## About UserEventService - # - # Service for ingesting end user actions on the customer website. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.user_event_service version: :v2, transport: :grpc, &block - require "google/cloud/retail/#{version.to_s.downcase}" - - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Retail.const_get(package_name).const_get(:UserEventService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the UserEventService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Retail.user_event_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the UserEventService service, - # or if the versioned client gem needs an update to support the UserEventService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.user_event_service_available? version: :v2, transport: :grpc - require "google/cloud/retail/#{version.to_s.downcase}" - package_name = Google::Cloud::Retail - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Retail.const_get package_name - return false unless service_module.const_defined? :UserEventService - service_module = service_module.const_get :UserEventService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-retail library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.retail if block_given? - - ::Google::Cloud.configure.retail - end - end - end -end - -helper_path = ::File.join __dir__, "retail", "helpers.rb" -require "google/cloud/retail/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb b/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.rb deleted file mode 100644 index e74c93ac7413..000000000000 --- a/owl-bot-staging/google-cloud-retail/lib/google/cloud/retail/version.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! - - -module Google - module Cloud - module Retail - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb deleted file mode 100644 index 66c341b97da2..000000000000 --- a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/client_test.rb +++ /dev/null @@ -1,295 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 "google/cloud/retail" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Retail::ClientConstructionMinitest < 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_analytics_service_grpc - skip unless Google::Cloud::Retail.analytics_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.analytics_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::AnalyticsService::Client, client - end - end - - def test_analytics_service_rest - skip unless Google::Cloud::Retail.analytics_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.analytics_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::AnalyticsService::Rest::Client, client - end - end - - def test_catalog_service_grpc - skip unless Google::Cloud::Retail.catalog_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.catalog_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::CatalogService::Client, client - end - end - - def test_catalog_service_rest - skip unless Google::Cloud::Retail.catalog_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.catalog_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::CatalogService::Rest::Client, client - end - end - - def test_completion_service_grpc - skip unless Google::Cloud::Retail.completion_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.completion_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::CompletionService::Client, client - end - end - - def test_completion_service_rest - skip unless Google::Cloud::Retail.completion_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.completion_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::CompletionService::Rest::Client, client - end - end - - def test_control_service_grpc - skip unless Google::Cloud::Retail.control_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.control_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::ControlService::Client, client - end - end - - def test_control_service_rest - skip unless Google::Cloud::Retail.control_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.control_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::ControlService::Rest::Client, client - end - end - - def test_search_service_grpc - skip unless Google::Cloud::Retail.search_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.search_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::SearchService::Client, client - end - end - - def test_search_service_rest - skip unless Google::Cloud::Retail.search_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.search_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::SearchService::Rest::Client, client - end - end - - def test_conversational_search_service_grpc - skip unless Google::Cloud::Retail.conversational_search_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.conversational_search_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::ConversationalSearchService::Client, client - end - end - - def test_conversational_search_service_rest - skip unless Google::Cloud::Retail.conversational_search_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.conversational_search_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::ConversationalSearchService::Rest::Client, client - end - end - - def test_generative_question_service_grpc - skip unless Google::Cloud::Retail.generative_question_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.generative_question_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::GenerativeQuestionService::Client, client - end - end - - def test_generative_question_service_rest - skip unless Google::Cloud::Retail.generative_question_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.generative_question_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client, client - end - end - - def test_model_service_grpc - skip unless Google::Cloud::Retail.model_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.model_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::ModelService::Client, client - end - end - - def test_model_service_rest - skip unless Google::Cloud::Retail.model_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.model_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::ModelService::Rest::Client, client - end - end - - def test_prediction_service_grpc - skip unless Google::Cloud::Retail.prediction_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.prediction_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::PredictionService::Client, client - end - end - - def test_prediction_service_rest - skip unless Google::Cloud::Retail.prediction_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.prediction_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::PredictionService::Rest::Client, client - end - end - - def test_product_service_grpc - skip unless Google::Cloud::Retail.product_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.product_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::ProductService::Client, client - end - end - - def test_product_service_rest - skip unless Google::Cloud::Retail.product_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.product_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::ProductService::Rest::Client, client - end - end - - def test_serving_config_service_grpc - skip unless Google::Cloud::Retail.serving_config_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.serving_config_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::ServingConfigService::Client, client - end - end - - def test_serving_config_service_rest - skip unless Google::Cloud::Retail.serving_config_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.serving_config_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::ServingConfigService::Rest::Client, client - end - end - - def test_user_event_service_grpc - skip unless Google::Cloud::Retail.user_event_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Retail.user_event_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Retail::V2::UserEventService::Client, client - end - end - - def test_user_event_service_rest - skip unless Google::Cloud::Retail.user_event_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Retail.user_event_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Retail::V2::UserEventService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb b/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.rb deleted file mode 100644 index d6b0727bd7a8..000000000000 --- a/owl-bot-staging/google-cloud-retail/test/google/cloud/retail/version_test.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 "helper" -require "google/cloud/retail/version" - -class Google::Cloud::Retail::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Retail::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-retail/test/helper.rb b/owl-bot-staging/google-cloud-retail/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-retail/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-run-client/.gitignore b/owl-bot-staging/google-cloud-run-client/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-run-client/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-run-client/.repo-metadata.json b/owl-bot-staging/google-cloud-run-client/.repo-metadata.json deleted file mode 100644 index 4ae6c80548ae..000000000000 --- a/owl-bot-staging/google-cloud-run-client/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "run.googleapis.com", - "api_shortname": "run", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-run/latest", - "distribution_name": "google-cloud-run", - "is_cloud": true, - "language": "ruby", - "name": "run", - "name_pretty": "Cloud Run API", - "product_documentation": "https://cloud.google.com/run", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests.", - "ruby-cloud-product-url": "https://cloud.google.com/run", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-run-client/.rubocop.yml b/owl-bot-staging/google-cloud-run-client/.rubocop.yml deleted file mode 100644 index ad7933d2c5c6..000000000000 --- a/owl-bot-staging/google-cloud-run-client/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-run.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-run.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-run-client/.toys.rb b/owl-bot-staging/google-cloud-run-client/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-run-client/.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-run-client/.yardopts b/owl-bot-staging/google-cloud-run-client/.yardopts deleted file mode 100644 index a35195cf2f13..000000000000 --- a/owl-bot-staging/google-cloud-run-client/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Run API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md b/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md deleted file mode 100644 index cb9bbe37a075..000000000000 --- a/owl-bot-staging/google-cloud-run-client/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-run 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-run 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/run" - -client = Google::Cloud::Run.builds do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/run" - -Google::Cloud::Run.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Run.builds -``` - -### 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-run -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/run" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Run.builds -``` - -### 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-run-client/CHANGELOG.md b/owl-bot-staging/google-cloud-run-client/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-run-client/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-run-client/Gemfile b/owl-bot-staging/google-cloud-run-client/Gemfile deleted file mode 100644 index c71b070720d3..000000000000 --- a/owl-bot-staging/google-cloud-run-client/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-run-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-run.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-run-client/LICENSE.md b/owl-bot-staging/google-cloud-run-client/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-run-client/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-run-client/README.md b/owl-bot-staging/google-cloud-run-client/README.md deleted file mode 100644 index 4893b65a7db4..000000000000 --- a/owl-bot-staging/google-cloud-run-client/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Cloud Run API - -API Client library for the Cloud Run API - -Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-run-v*`. -The gem `google-cloud-run` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-run/latest) -for this library, google-cloud-run, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest). - -See also the [Product Documentation](https://cloud.google.com/run) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-run -``` - -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/run.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/run" - -client = Google::Cloud::Run.builds -request = ::Google::Cloud::Run::V2::SubmitBuildRequest.new # (request fields as keyword arguments...) -response = client.submit_build request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-run`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-run-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-run`. -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-run-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-run-client/Rakefile b/owl-bot-staging/google-cloud-run-client/Rakefile deleted file mode 100644 index 7e92d30093b8..000000000000 --- a/owl-bot-staging/google-cloud-run-client/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 = true -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-run 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/run/v2/builds/credentials" - ::Google::Cloud::Run::V2::Builds::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-run 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-run 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-run 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-run gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-run" - header "google-cloud-run rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-run yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-run 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-run 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-run 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-run-client/google-cloud-run.gemspec b/owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec deleted file mode 100644 index 541551c12ae3..000000000000 --- a/owl-bot-staging/google-cloud-run-client/google-cloud-run.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/run/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-run" - gem.version = Google::Cloud::Run::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests." - gem.summary = "API Client library for the Cloud Run 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-run-v2", ">= 0.17", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb b/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb deleted file mode 100644 index 5decb206ead1..000000000000 --- a/owl-bot-staging/google-cloud-run-client/lib/google-cloud-run.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/run" unless defined? Google::Cloud::Run::VERSION diff --git a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb deleted file mode 100644 index 1b1abc983569..000000000000 --- a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/run/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :run do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Run - ## - # Create a new client object for Builds. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Builds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Builds-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Builds service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Builds service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.builds_available?}. - # - # ## About Builds - # - # Cloud Run Build Control Plane API - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.builds version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Builds) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Builds service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.builds}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Builds service, - # or if the versioned client gem needs an update to support the Builds service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.builds_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Builds - service_module = service_module.const_get :Builds - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Executions. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Executions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Executions-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Executions service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Executions service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.executions_available?}. - # - # ## About Executions - # - # Cloud Run Execution Control Plane API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.executions version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Executions) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Executions service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.executions}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Executions service, - # or if the versioned client gem needs an update to support the Executions service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.executions_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Executions - service_module = service_module.const_get :Executions - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Instances. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Instances::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Instances-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Instances service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Instances service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.instances_available?}. - # - # ## About Instances - # - # The Cloud Run Instances API allows you to manage Cloud Run Instances. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.instances version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Instances) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Instances service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.instances}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Instances service, - # or if the versioned client gem needs an update to support the Instances service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.instances_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Instances - service_module = service_module.const_get :Instances - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Jobs. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Jobs::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Jobs-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Jobs service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Jobs service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.jobs_available?}. - # - # ## About Jobs - # - # Cloud Run Job Control Plane API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.jobs version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Jobs) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Jobs service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.jobs}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Jobs service, - # or if the versioned client gem needs an update to support the Jobs service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.jobs_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Jobs - service_module = service_module.const_get :Jobs - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Revisions. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Revisions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Revisions-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Revisions service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Revisions service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.revisions_available?}. - # - # ## About Revisions - # - # Cloud Run Revision Control Plane API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.revisions version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Revisions) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Revisions service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.revisions}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Revisions service, - # or if the versioned client gem needs an update to support the Revisions service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.revisions_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Revisions - service_module = service_module.const_get :Revisions - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Services. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Services::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Services-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Services service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Services service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.services_available?}. - # - # ## About Services - # - # Cloud Run Service Control Plane API - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.services version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Services) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Services service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.services}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Services service, - # or if the versioned client gem needs an update to support the Services service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.services_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Services - service_module = service_module.const_get :Services - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for Tasks. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::Tasks::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Tasks-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Tasks service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Tasks service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.tasks_available?}. - # - # ## About Tasks - # - # Cloud Run Task Control Plane API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.tasks version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:Tasks) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Tasks service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.tasks}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Tasks service, - # or if the versioned client gem needs an update to support the Tasks service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.tasks_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :Tasks - service_module = service_module.const_get :Tasks - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for WorkerPools. - # - # By default, this returns an instance of - # [Google::Cloud::Run::V2::WorkerPools::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-WorkerPools-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the WorkerPools service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the WorkerPools service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Run.worker_pools_available?}. - # - # ## About WorkerPools - # - # Cloud Run WorkerPool Control Plane API. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.worker_pools version: :v2, transport: :grpc, &block - require "google/cloud/run/#{version.to_s.downcase}" - - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Run.const_get(package_name).const_get(:WorkerPools) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the WorkerPools service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Run.worker_pools}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the WorkerPools service, - # or if the versioned client gem needs an update to support the WorkerPools service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.worker_pools_available? version: :v2, transport: :grpc - require "google/cloud/run/#{version.to_s.downcase}" - package_name = Google::Cloud::Run - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Run.const_get package_name - return false unless service_module.const_defined? :WorkerPools - service_module = service_module.const_get :WorkerPools - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-run library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.run if block_given? - - ::Google::Cloud.configure.run - end - end - end -end - -helper_path = ::File.join __dir__, "run", "helpers.rb" -require "google/cloud/run/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb b/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.rb deleted file mode 100644 index 09106e21d937..000000000000 --- a/owl-bot-staging/google-cloud-run-client/lib/google/cloud/run/version.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! - - -module Google - module Cloud - module Run - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb deleted file mode 100644 index 798955480791..000000000000 --- a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/client_test.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 "google/cloud/run" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Run::ClientConstructionMinitest < 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_builds_grpc - skip unless Google::Cloud::Run.builds_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.builds transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Builds::Client, client - end - end - - def test_builds_rest - skip unless Google::Cloud::Run.builds_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.builds transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Builds::Rest::Client, client - end - end - - def test_executions_grpc - skip unless Google::Cloud::Run.executions_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.executions transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Executions::Client, client - end - end - - def test_executions_rest - skip unless Google::Cloud::Run.executions_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.executions transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Executions::Rest::Client, client - end - end - - def test_instances_grpc - skip unless Google::Cloud::Run.instances_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.instances transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Instances::Client, client - end - end - - def test_instances_rest - skip unless Google::Cloud::Run.instances_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.instances transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Instances::Rest::Client, client - end - end - - def test_jobs_grpc - skip unless Google::Cloud::Run.jobs_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.jobs transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Jobs::Client, client - end - end - - def test_jobs_rest - skip unless Google::Cloud::Run.jobs_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.jobs transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Jobs::Rest::Client, client - end - end - - def test_revisions_grpc - skip unless Google::Cloud::Run.revisions_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.revisions transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Revisions::Client, client - end - end - - def test_revisions_rest - skip unless Google::Cloud::Run.revisions_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.revisions transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Revisions::Rest::Client, client - end - end - - def test_services_grpc - skip unless Google::Cloud::Run.services_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.services transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Services::Client, client - end - end - - def test_services_rest - skip unless Google::Cloud::Run.services_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.services transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Services::Rest::Client, client - end - end - - def test_tasks_grpc - skip unless Google::Cloud::Run.tasks_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.tasks transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::Tasks::Client, client - end - end - - def test_tasks_rest - skip unless Google::Cloud::Run.tasks_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.tasks transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::Tasks::Rest::Client, client - end - end - - def test_worker_pools_grpc - skip unless Google::Cloud::Run.worker_pools_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Run.worker_pools transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Run::V2::WorkerPools::Client, client - end - end - - def test_worker_pools_rest - skip unless Google::Cloud::Run.worker_pools_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Run.worker_pools transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Run::V2::WorkerPools::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb b/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.rb deleted file mode 100644 index 95d32d7c9348..000000000000 --- a/owl-bot-staging/google-cloud-run-client/test/google/cloud/run/version_test.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 "helper" -require "google/cloud/run/version" - -class Google::Cloud::Run::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Run::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-run-client/test/helper.rb b/owl-bot-staging/google-cloud-run-client/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-run-client/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json deleted file mode 100644 index a0d73e374874..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "saasservicemgmt.googleapis.com", - "api_shortname": "saasservicemgmt", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt/latest", - "distribution_name": "google-cloud-saas_platform-saas_service_mgmt", - "is_cloud": true, - "language": "ruby", - "name": "saasservicemgmt", - "name_pretty": "App Lifecycle Manager API", - "product_documentation": "https://cloud.google.com/saas-runtime/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "App Lifecycle Manager Overview.", - "ruby-cloud-product-url": "https://cloud.google.com/saas-runtime/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml deleted file mode 100644 index ddc9f5e4cb50..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-saas_platform-saas_service_mgmt.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-saas_platform-saas_service_mgmt.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.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-saas_platform-saas_service_mgmt/.yardopts b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts deleted file mode 100644 index 98d93f183c67..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="App Lifecycle Manager API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md deleted file mode 100644 index 95988c838d8f..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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/saas_platform/saas_service_mgmt" - -client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/saas_platform/saas_service_mgmt" - -Google::Cloud::SaasPlatform::SaasServiceMgmt.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments -``` - -### 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-saas_platform-saas_service_mgmt -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/saas_platform/saas_service_mgmt" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments -``` - -### 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-saas_platform-saas_service_mgmt/CHANGELOG.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile deleted file mode 100644 index 8f88307f27d2..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-saas_platform-saas_service_mgmt-v1beta1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-saas_platform-saas_service_mgmt.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/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-saas_platform-saas_service_mgmt/README.md b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md deleted file mode 100644 index b493365a5ecf..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the App Lifecycle Manager API - -Model, deploy, and operate your SaaS at scale. - -App Lifecycle Manager Overview. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-saas_platform-saas_service_mgmt-v*`. -The gem `google-cloud-saas_platform-saas_service_mgmt` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt/latest) -for this library, google-cloud-saas_platform-saas_service_mgmt, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-saas_platform-saas_service_mgmt-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest). - -See also the [Product Documentation](https://cloud.google.com/saas-runtime/docs/overview) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-saas_platform-saas_service_mgmt -``` - -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/saasservicemgmt.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/saas_platform/saas_service_mgmt" - -client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments -request = ::Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::ListSaasRequest.new # (request fields as keyword arguments...) -response = client.list_saas request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-saas_platform-saas_service_mgmt-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-saas_platform-saas_service_mgmt`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-saas_platform-saas_service_mgmt-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-saas_platform-saas_service_mgmt`. -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-saas_platform-saas_service_mgmt-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-saas_platform-saas_service_mgmt/Rakefile b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/Rakefile deleted file mode 100644 index 10f8c02a616a..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/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 = true -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-saas_platform-saas_service_mgmt 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/saas_platform/saas_service_mgmt/v1beta1/saas_deployments/credentials" - ::Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-saas_platform-saas_service_mgmt" - header "google-cloud-saas_platform-saas_service_mgmt rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-saas_platform-saas_service_mgmt yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt 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-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec deleted file mode 100644 index 874144065ddf..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/google-cloud-saas_platform-saas_service_mgmt.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/saas_platform/saas_service_mgmt/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-saas_platform-saas_service_mgmt" - gem.version = Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "App Lifecycle Manager Overview." - gem.summary = "Model, deploy, and operate your SaaS at scale." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-saas_platform-saas_service_mgmt-v1beta1", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb deleted file mode 100644 index 864dbb472e44..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google-cloud-saas_platform-saas_service_mgmt.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/saas_platform/saas_service_mgmt" unless defined? Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.rb deleted file mode 100644 index 938eab48ac66..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/saas_platform/saas_service_mgmt/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :saas_platform_saas_service_mgmt do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module SaasPlatform - module SaasServiceMgmt - ## - # Create a new client object for SaasDeployments. - # - # By default, this returns an instance of - # [Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest/Google-Cloud-SaasPlatform-SaasServiceMgmt-V1beta1-SaasDeployments-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SaasDeployments service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SaasDeployments service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available?}. - # - # ## About SaasDeployments - # - # Manages the deployment of SaaS services. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.saas_deployments version: :v1beta1, transport: :grpc, &block - require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" - - package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get(package_name).const_get(:SaasDeployments) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SaasDeployments service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SaasDeployments service, - # or if the versioned client gem needs an update to support the SaasDeployments service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.saas_deployments_available? version: :v1beta1, transport: :grpc - require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" - package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get package_name - return false unless service_module.const_defined? :SaasDeployments - service_module = service_module.const_get :SaasDeployments - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for SaasRollouts. - # - # By default, this returns an instance of - # [Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-saas_platform-saas_service_mgmt-v1beta1/latest/Google-Cloud-SaasPlatform-SaasServiceMgmt-V1beta1-SaasRollouts-Client) - # for a gRPC client for version V1beta1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SaasRollouts service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SaasRollouts service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available?}. - # - # ## About SaasRollouts - # - # Manages the rollout of SaaS services. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.saas_rollouts version: :v1beta1, transport: :grpc, &block - require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" - - package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get(package_name).const_get(:SaasRollouts) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SaasRollouts service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SaasRollouts service, - # or if the versioned client gem needs an update to support the SaasRollouts service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.saas_rollouts_available? version: :v1beta1, transport: :grpc - require "google/cloud/saas_platform/saas_service_mgmt/#{version.to_s.downcase}" - package_name = Google::Cloud::SaasPlatform::SaasServiceMgmt - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SaasPlatform::SaasServiceMgmt.const_get package_name - return false unless service_module.const_defined? :SaasRollouts - service_module = service_module.const_get :SaasRollouts - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-saas_platform-saas_service_mgmt library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.saas_platform_saas_service_mgmt if block_given? - - ::Google::Cloud.configure.saas_platform_saas_service_mgmt - end - end - end - end -end - -helper_path = ::File.join __dir__, "saas_service_mgmt", "helpers.rb" -require "google/cloud/saas_platform/saas_service_mgmt/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/version.rb deleted file mode 100644 index 702f6d719d26..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/lib/google/cloud/saas_platform/saas_service_mgmt/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 SaasPlatform - module SaasServiceMgmt - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.rb deleted file mode 100644 index 75a386d33524..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/client_test.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! - -require "helper" -require "google/cloud/saas_platform/saas_service_mgmt" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::SaasPlatform::SaasServiceMgmt::ClientConstructionMinitest < 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_saas_deployments_grpc - skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Client, client - end - end - - def test_saas_deployments_rest - skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_deployments transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasDeployments::Rest::Client, client - end - end - - def test_saas_rollouts_grpc - skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Client, client - end - end - - def test_saas_rollouts_rest - skip unless Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::SaasPlatform::SaasServiceMgmt.saas_rollouts transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::SaasPlatform::SaasServiceMgmt::V1beta1::SaasRollouts::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.rb deleted file mode 100644 index b5ea633ed383..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/google/cloud/saas_platform/saas_service_mgmt/version_test.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 "helper" -require "google/cloud/saas_platform/saas_service_mgmt/version" - -class Google::Cloud::SaasPlatform::SaasServiceMgmt::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::SaasPlatform::SaasServiceMgmt::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb b/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-saas_platform-saas_service_mgmt/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-scheduler/.gitignore b/owl-bot-staging/google-cloud-scheduler/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json b/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json deleted file mode 100644 index fe18ddd5c2a0..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudscheduler.googleapis.com", - "api_shortname": "cloudscheduler", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler/latest", - "distribution_name": "google-cloud-scheduler", - "is_cloud": true, - "language": "ruby", - "name": "cloudscheduler", - "name_pretty": "Cloud Scheduler API", - "product_documentation": "https://cloud.google.com/scheduler", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place.", - "ruby-cloud-env-prefix": "SCHEDULER", - "ruby-cloud-product-url": "https://cloud.google.com/scheduler", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-scheduler/.rubocop.yml b/owl-bot-staging/google-cloud-scheduler/.rubocop.yml deleted file mode 100644 index 8b70a3970a2e..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-scheduler.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-scheduler.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-scheduler/.toys.rb b/owl-bot-staging/google-cloud-scheduler/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/.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-scheduler/.yardopts b/owl-bot-staging/google-cloud-scheduler/.yardopts deleted file mode 100644 index 0a96e817b4db..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Scheduler API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md b/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md deleted file mode 100644 index 2fc051ac6297..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-scheduler 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-scheduler 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/scheduler" - -client = Google::Cloud::Scheduler.cloud_scheduler do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/scheduler" - -Google::Cloud::Scheduler.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Scheduler.cloud_scheduler -``` - -### 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-scheduler -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/scheduler" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Scheduler.cloud_scheduler -``` - -### 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-scheduler/CHANGELOG.md b/owl-bot-staging/google-cloud-scheduler/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-scheduler/Gemfile b/owl-bot-staging/google-cloud-scheduler/Gemfile deleted file mode 100644 index c44a1a569acd..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-scheduler-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-scheduler.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-scheduler/LICENSE.md b/owl-bot-staging/google-cloud-scheduler/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/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-scheduler/README.md b/owl-bot-staging/google-cloud-scheduler/README.md deleted file mode 100644 index 6454399e8791..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Cloud Scheduler API - -API Client library for the Cloud Scheduler API - -Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-scheduler-v*`. -The gem `google-cloud-scheduler` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler/latest) -for this library, google-cloud-scheduler, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/scheduler) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-scheduler -``` - -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/cloudscheduler.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/scheduler" - -client = Google::Cloud::Scheduler.cloud_scheduler -request = ::Google::Cloud::Scheduler::V1::ListJobsRequest.new # (request fields as keyword arguments...) -response = client.list_jobs request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-scheduler`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-scheduler-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-scheduler`. -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-scheduler-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-scheduler/Rakefile b/owl-bot-staging/google-cloud-scheduler/Rakefile deleted file mode 100644 index ca517666c458..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/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 = true -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-scheduler acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SCHEDULER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SCHEDULER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SCHEDULER_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 SCHEDULER_TEST_PROJECT=test123 SCHEDULER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/scheduler/v1/cloud_scheduler/credentials" - ::Google::Cloud::Scheduler::V1::CloudScheduler::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SCHEDULER_PROJECT"] = project - ENV["SCHEDULER_TEST_PROJECT"] = project - ENV["SCHEDULER_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-scheduler 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-scheduler 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-scheduler 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-scheduler gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-scheduler" - header "google-cloud-scheduler rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-scheduler yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-scheduler 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-scheduler 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-scheduler 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-scheduler/google-cloud-scheduler.gemspec b/owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec deleted file mode 100644 index 51b6de1bf848..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/google-cloud-scheduler.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/scheduler/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-scheduler" - gem.version = Google::Cloud::Scheduler::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place." - gem.summary = "API Client library for the Cloud Scheduler 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-scheduler-v1", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb b/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb deleted file mode 100644 index 5dbd39bbc30f..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/lib/google-cloud-scheduler.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/scheduler" unless defined? Google::Cloud::Scheduler::VERSION diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb deleted file mode 100644 index 086445509c72..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/scheduler/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :scheduler do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Scheduler - ## - # Create a new client object for CloudScheduler. - # - # By default, this returns an instance of - # [Google::Cloud::Scheduler::V1::CloudScheduler::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest/Google-Cloud-Scheduler-V1-CloudScheduler-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CloudScheduler service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CloudScheduler service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Scheduler.cloud_scheduler_available?}. - # - # ## About CloudScheduler - # - # The Cloud Scheduler API allows external entities to reliably - # schedule asynchronous jobs. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.cloud_scheduler version: :v1, transport: :grpc, &block - require "google/cloud/scheduler/#{version.to_s.downcase}" - - package_name = Google::Cloud::Scheduler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Scheduler.const_get(package_name).const_get(:CloudScheduler) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CloudScheduler service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Scheduler.cloud_scheduler}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CloudScheduler service, - # or if the versioned client gem needs an update to support the CloudScheduler service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.cloud_scheduler_available? version: :v1, transport: :grpc - require "google/cloud/scheduler/#{version.to_s.downcase}" - package_name = Google::Cloud::Scheduler - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Scheduler.const_get package_name - return false unless service_module.const_defined? :CloudScheduler - service_module = service_module.const_get :CloudScheduler - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-scheduler library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.scheduler if block_given? - - ::Google::Cloud.configure.scheduler - end - end - end -end - -helper_path = ::File.join __dir__, "scheduler", "helpers.rb" -require "google/cloud/scheduler/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb b/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.rb deleted file mode 100644 index c4e8d11ea4bc..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/lib/google/cloud/scheduler/version.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! - - -module Google - module Cloud - module Scheduler - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb deleted file mode 100644 index 5ab48d5d0553..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/scheduler" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Scheduler::ClientConstructionMinitest < 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_cloud_scheduler_grpc - skip unless Google::Cloud::Scheduler.cloud_scheduler_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Scheduler.cloud_scheduler transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Scheduler::V1::CloudScheduler::Client, client - end - end - - def test_cloud_scheduler_rest - skip unless Google::Cloud::Scheduler.cloud_scheduler_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Scheduler.cloud_scheduler transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Scheduler::V1::CloudScheduler::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb b/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.rb deleted file mode 100644 index 02bfe3ac6be4..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/test/google/cloud/scheduler/version_test.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 "helper" -require "google/cloud/scheduler/version" - -class Google::Cloud::Scheduler::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Scheduler::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-scheduler/test/helper.rb b/owl-bot-staging/google-cloud-scheduler/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-scheduler/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-secret_manager/.gitignore b/owl-bot-staging/google-cloud-secret_manager/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json deleted file mode 100644 index 2841043a0679..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "secretmanager.googleapis.com", - "api_shortname": "secretmanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager/latest", - "distribution_name": "google-cloud-secret_manager", - "is_cloud": true, - "language": "ruby", - "name": "secretmanager", - "name_pretty": "Secret Manager API", - "product_documentation": "https://cloud.google.com/secret-manager", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud.", - "ruby-cloud-env-prefix": "SECRET_MANAGER", - "ruby-cloud-product-url": "https://cloud.google.com/secret-manager", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml deleted file mode 100644 index f23c496220e0..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-secret_manager.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-secret_manager.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager/.toys.rb b/owl-bot-staging/google-cloud-secret_manager/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/.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-secret_manager/.yardopts b/owl-bot-staging/google-cloud-secret_manager/.yardopts deleted file mode 100644 index 124a053abd98..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Secret Manager API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md deleted file mode 100644 index 7fd185b48c4a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-secret_manager 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-secret_manager 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/secret_manager" - -client = Google::Cloud::SecretManager.secret_manager_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/secret_manager" - -Google::Cloud::SecretManager.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::SecretManager.secret_manager_service -``` - -### 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-secret_manager -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/secret_manager" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::SecretManager.secret_manager_service -``` - -### 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-secret_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-secret_manager/Gemfile b/owl-bot-staging/google-cloud-secret_manager/Gemfile deleted file mode 100644 index 2fe2a37e1ebe..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-secret_manager-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-secret_manager.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-secret_manager/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/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-secret_manager/README.md b/owl-bot-staging/google-cloud-secret_manager/README.md deleted file mode 100644 index cad671b45c7d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Secret Manager API - -API Client library for the Secret Manager API - -Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-secret_manager-v*`. -The gem `google-cloud-secret_manager` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager/latest) -for this library, google-cloud-secret_manager, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/secret-manager) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-secret_manager -``` - -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/secretmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/secret_manager" - -client = Google::Cloud::SecretManager.secret_manager_service -request = ::Google::Cloud::SecretManager::V1::ListSecretsRequest.new # (request fields as keyword arguments...) -response = client.list_secrets request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-secret_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-secret_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-secret_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-secret_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-secret_manager/Rakefile b/owl-bot-staging/google-cloud-secret_manager/Rakefile deleted file mode 100644 index fde45ed3739d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/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 = true -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-secret_manager acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SECRET_MANAGER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SECRET_MANAGER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SECRET_MANAGER_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 SECRET_MANAGER_TEST_PROJECT=test123 SECRET_MANAGER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/secret_manager/v1/secret_manager_service/credentials" - ::Google::Cloud::SecretManager::V1::SecretManagerService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SECRET_MANAGER_PROJECT"] = project - ENV["SECRET_MANAGER_TEST_PROJECT"] = project - ENV["SECRET_MANAGER_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-secret_manager 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-secret_manager 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-secret_manager 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-secret_manager gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-secret_manager" - header "google-cloud-secret_manager rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-secret_manager yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-secret_manager 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-secret_manager 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-secret_manager 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-secret_manager/google-cloud-secret_manager.gemspec b/owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec deleted file mode 100644 index a74c00324f0b..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/google-cloud-secret_manager.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/secret_manager/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-secret_manager" - gem.version = Google::Cloud::SecretManager::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Secret Manager is a secure and convenient storage system for API keys, passwords, certificates, and other sensitive data. Secret Manager provides a central place and single source of truth to manage, access, and audit secrets across Google Cloud." - gem.summary = "API Client library for the Secret Manager 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-secret_manager-v1", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb deleted file mode 100644 index ed54373735d2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/lib/google-cloud-secret_manager.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secret_manager" unless defined? Google::Cloud::SecretManager::VERSION diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb deleted file mode 100644 index 0d7f99c14013..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/secret_manager/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :secret_manager do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module SecretManager - ## - # Create a new client object for SecretManagerService. - # - # By default, this returns an instance of - # [Google::Cloud::SecretManager::V1::SecretManagerService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretManagerService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SecretManagerService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the SecretManagerService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SecretManager.secret_manager_service_available?}. - # - # ## About SecretManagerService - # - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * Secret - # * SecretVersion - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [::Object] A client object for the specified version. - # - def self.secret_manager_service version: :v1, &block - require "google/cloud/secret_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::SecretManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SecretManager.const_get(package_name).const_get(:SecretManagerService) - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SecretManagerService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SecretManager.secret_manager_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SecretManagerService service, - # or if the versioned client gem needs an update to support the SecretManagerService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [boolean] Whether the service is available. - # - def self.secret_manager_service_available? version: :v1 - require "google/cloud/secret_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::SecretManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SecretManager.const_get package_name - return false unless service_module.const_defined? :SecretManagerService - service_module = service_module.const_get :SecretManagerService - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-secret_manager library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.secret_manager if block_given? - - ::Google::Cloud.configure.secret_manager - end - end - end -end - -helper_path = ::File.join __dir__, "secret_manager", "helpers.rb" -require "google/cloud/secret_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb b/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.rb deleted file mode 100644 index 7ca62e39649f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/lib/google/cloud/secret_manager/version.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! - - -module Google - module Cloud - module SecretManager - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.rb deleted file mode 100644 index 9bf24e4ef2a7..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/client_test.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 "helper" -require "google/cloud/secret_manager" -require "gapic/common" -require "gapic/grpc" - -class Google::Cloud::SecretManager::ClientConstructionMinitest < 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_secret_manager_service_grpc - skip unless Google::Cloud::SecretManager.secret_manager_service_available? - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SecretManager.secret_manager_service do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SecretManager::V1::SecretManagerService::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb b/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.rb deleted file mode 100644 index 7188a10c49e1..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/test/google/cloud/secret_manager/version_test.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 "helper" -require "google/cloud/secret_manager/version" - -class Google::Cloud::SecretManager::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::SecretManager::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.gitignore b/owl-bot-staging/google-cloud-secure_source_manager/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json b/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json deleted file mode 100644 index c96017f17418..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "securesourcemanager.googleapis.com", - "api_shortname": "securesourcemanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager/latest", - "distribution_name": "google-cloud-secure_source_manager", - "is_cloud": true, - "language": "ruby", - "name": "securesourcemanager", - "name_pretty": "Secure Source Manager API", - "product_documentation": "https://cloud.google.com/secure-source-manager/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud.", - "ruby-cloud-product-url": "https://cloud.google.com/secure-source-manager/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml b/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml deleted file mode 100644 index 39706a9e0bfe..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-secure_source_manager.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-secure_source_manager.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/.toys.rb b/owl-bot-staging/google-cloud-secure_source_manager/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/.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-secure_source_manager/.yardopts b/owl-bot-staging/google-cloud-secure_source_manager/.yardopts deleted file mode 100644 index 5c99ec81c960..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Secure Source Manager API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md deleted file mode 100644 index 70e84a04d138..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-secure_source_manager 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-secure_source_manager 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/secure_source_manager" - -client = Google::Cloud::SecureSourceManager.secure_source_manager do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/secure_source_manager" - -Google::Cloud::SecureSourceManager.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::SecureSourceManager.secure_source_manager -``` - -### 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-secure_source_manager -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/secure_source_manager" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::SecureSourceManager.secure_source_manager -``` - -### 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-secure_source_manager/CHANGELOG.md b/owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-secure_source_manager/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager/Gemfile deleted file mode 100644 index 62aad3de0c1f..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-secure_source_manager-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-secure_source_manager.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md b/owl-bot-staging/google-cloud-secure_source_manager/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/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-secure_source_manager/README.md b/owl-bot-staging/google-cloud-secure_source_manager/README.md deleted file mode 100644 index e4ca64a63a6d..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Secure Source Manager API - -Regionally deployed, single-tenant managed source code repository hosted on Google Cloud. - -Regionally deployed, single-tenant managed source code repository hosted on Google Cloud. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-secure_source_manager-v*`. -The gem `google-cloud-secure_source_manager` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager/latest) -for this library, google-cloud-secure_source_manager, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-secure_source_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/secure-source-manager/docs/overview) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-secure_source_manager -``` - -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/securesourcemanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/secure_source_manager" - -client = Google::Cloud::SecureSourceManager.secure_source_manager -request = ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-secure_source_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-secure_source_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-secure_source_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-secure_source_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-secure_source_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-secure_source_manager/Rakefile b/owl-bot-staging/google-cloud-secure_source_manager/Rakefile deleted file mode 100644 index c7970accf7b4..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/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 = true -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-secure_source_manager 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/secure_source_manager/v1/secure_source_manager/credentials" - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::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-secure_source_manager 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-secure_source_manager 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-secure_source_manager 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-secure_source_manager gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-secure_source_manager" - header "google-cloud-secure_source_manager rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-secure_source_manager yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-secure_source_manager 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-secure_source_manager 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-secure_source_manager 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-secure_source_manager/google-cloud-secure_source_manager.gemspec b/owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec deleted file mode 100644 index 8de41a0b590d..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/google-cloud-secure_source_manager.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/secure_source_manager/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-secure_source_manager" - gem.version = Google::Cloud::SecureSourceManager::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud." - gem.summary = "Regionally deployed, single-tenant managed source code repository hosted on Google Cloud." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-secure_source_manager-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb deleted file mode 100644 index 268a417c2881..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/lib/google-cloud-secure_source_manager.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secure_source_manager" unless defined? Google::Cloud::SecureSourceManager::VERSION diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.rb deleted file mode 100644 index 486b73863305..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/secure_source_manager/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :secure_source_manager do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module SecureSourceManager - ## - # Create a new client object for SecureSourceManager. - # - # By default, this returns an instance of - # [Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest/Google-Cloud-SecureSourceManager-V1-SecureSourceManager-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SecureSourceManager service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SecureSourceManager service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SecureSourceManager.secure_source_manager_available?}. - # - # ## About SecureSourceManager - # - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.secure_source_manager version: :v1, transport: :grpc, &block - require "google/cloud/secure_source_manager/#{version.to_s.downcase}" - - package_name = Google::Cloud::SecureSourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SecureSourceManager.const_get(package_name).const_get(:SecureSourceManager) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SecureSourceManager service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SecureSourceManager.secure_source_manager}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SecureSourceManager service, - # or if the versioned client gem needs an update to support the SecureSourceManager service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.secure_source_manager_available? version: :v1, transport: :grpc - require "google/cloud/secure_source_manager/#{version.to_s.downcase}" - package_name = Google::Cloud::SecureSourceManager - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SecureSourceManager.const_get package_name - return false unless service_module.const_defined? :SecureSourceManager - service_module = service_module.const_get :SecureSourceManager - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-secure_source_manager library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.secure_source_manager if block_given? - - ::Google::Cloud.configure.secure_source_manager - end - end - end -end - -helper_path = ::File.join __dir__, "secure_source_manager", "helpers.rb" -require "google/cloud/secure_source_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb b/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.rb deleted file mode 100644 index 3e29de4e1fc7..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/lib/google/cloud/secure_source_manager/version.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! - - -module Google - module Cloud - module SecureSourceManager - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb deleted file mode 100644 index 190212437d4c..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/secure_source_manager" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::SecureSourceManager::ClientConstructionMinitest < 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_secure_source_manager_grpc - skip unless Google::Cloud::SecureSourceManager.secure_source_manager_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SecureSourceManager.secure_source_manager transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client, client - end - end - - def test_secure_source_manager_rest - skip unless Google::Cloud::SecureSourceManager.secure_source_manager_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::SecureSourceManager.secure_source_manager transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.rb deleted file mode 100644 index bd800a9c364b..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/test/google/cloud/secure_source_manager/version_test.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 "helper" -require "google/cloud/secure_source_manager/version" - -class Google::Cloud::SecureSourceManager::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::SecureSourceManager::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb b/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-security-private_ca/.gitignore b/owl-bot-staging/google-cloud-security-private_ca/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json deleted file mode 100644 index 2b91981ab57d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "privateca.googleapis.com", - "api_shortname": "privateca", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca/latest", - "distribution_name": "google-cloud-security-private_ca", - "is_cloud": true, - "language": "ruby", - "name": "privateca", - "name_pretty": "Certificate Authority Service API", - "product_documentation": "https://cloud.google.com/certificate-authority-service/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA).", - "ruby-cloud-env-prefix": "PRIVATE_CA", - "ruby-cloud-product-url": "https://cloud.google.com/certificate-authority-service/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml deleted file mode 100644 index 7f896b67fed6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security-private_ca.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-security-private_ca.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/.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-security-private_ca/.yardopts b/owl-bot-staging/google-cloud-security-private_ca/.yardopts deleted file mode 100644 index f80be6dbfa0c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Certificate Authority Service API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md deleted file mode 100644 index 21501331e8f2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security-private_ca 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-security-private_ca 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/security/private_ca" - -client = Google::Cloud::Security::PrivateCA.certificate_authority_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security/private_ca" - -Google::Cloud::Security::PrivateCA.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Security::PrivateCA.certificate_authority_service -``` - -### 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-security-private_ca -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/security/private_ca" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Security::PrivateCA.certificate_authority_service -``` - -### 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-security-private_ca/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security-private_ca/Gemfile b/owl-bot-staging/google-cloud-security-private_ca/Gemfile deleted file mode 100644 index 75f48ab4c72a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-security-private_ca-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security-private_ca.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security-private_ca/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/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-security-private_ca/README.md b/owl-bot-staging/google-cloud-security-private_ca/README.md deleted file mode 100644 index 24a97fc1f067..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Certificate Authority Service API - -API Client library for the Certificate Authority Service API - -Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA). - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-security-private_ca-v*`. -The gem `google-cloud-security-private_ca` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca/latest) -for this library, google-cloud-security-private_ca, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-security-private_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-security-private_ca -``` - -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/privateca.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/security/private_ca" - -client = Google::Cloud::Security::PrivateCA.certificate_authority_service -request = ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new # (request fields as keyword arguments...) -response = client.create_certificate request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-security-private_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security-private_ca`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security-private_ca-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-security-private_ca`. -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-security-private_ca-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-security-private_ca/Rakefile b/owl-bot-staging/google-cloud-security-private_ca/Rakefile deleted file mode 100644 index 9d47be393410..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/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 = true -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-security-private_ca acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["PRIVATE_CA_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["PRIVATE_CA_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["PRIVATE_CA_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 PRIVATE_CA_TEST_PROJECT=test123 PRIVATE_CA_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["PRIVATE_CA_PROJECT"] = project - ENV["PRIVATE_CA_TEST_PROJECT"] = project - ENV["PRIVATE_CA_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-security-private_ca 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-security-private_ca 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-security-private_ca 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-security-private_ca gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security-private_ca" - header "google-cloud-security-private_ca rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security-private_ca yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security-private_ca 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-security-private_ca 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-security-private_ca 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-security-private_ca/google-cloud-security-private_ca.gemspec b/owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec deleted file mode 100644 index 18c6739342bc..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/google-cloud-security-private_ca.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security/private_ca/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security-private_ca" - gem.version = Google::Cloud::Security::PrivateCA::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Certificate Authority Service is a highly available, scalable Google Cloud service that enables you to simplify, automate, and customize the deployment, management, and security of private certificate authorities (CA)." - gem.summary = "API Client library for the Certificate Authority Service 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-security-private_ca-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb deleted file mode 100644 index dfcf801e91e7..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/lib/google-cloud-security-private_ca.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/private_ca" unless defined? Google::Cloud::Security::PrivateCA::VERSION diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb deleted file mode 100644 index 9e4201a2067f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/security/private_ca/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :security_private_ca do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Security - module PrivateCA - ## - # Create a new client object for CertificateAuthorityService. - # - # By default, this returns an instance of - # [Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest/Google-Cloud-Security-PrivateCA-V1-CertificateAuthorityService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CertificateAuthorityService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CertificateAuthorityService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Security::PrivateCA.certificate_authority_service_available?}. - # - # ## About CertificateAuthorityService - # - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.certificate_authority_service version: :v1, transport: :grpc, &block - require "google/cloud/security/private_ca/#{version.to_s.downcase}" - - package_name = Google::Cloud::Security::PrivateCA - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Security::PrivateCA.const_get(package_name).const_get(:CertificateAuthorityService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CertificateAuthorityService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Security::PrivateCA.certificate_authority_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CertificateAuthorityService service, - # or if the versioned client gem needs an update to support the CertificateAuthorityService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.certificate_authority_service_available? version: :v1, transport: :grpc - require "google/cloud/security/private_ca/#{version.to_s.downcase}" - package_name = Google::Cloud::Security::PrivateCA - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Security::PrivateCA.const_get package_name - return false unless service_module.const_defined? :CertificateAuthorityService - service_module = service_module.const_get :CertificateAuthorityService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-security-private_ca library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.security_private_ca if block_given? - - ::Google::Cloud.configure.security_private_ca - end - end - end - end -end - -helper_path = ::File.join __dir__, "private_ca", "helpers.rb" -require "google/cloud/security/private_ca/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb b/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/version.rb deleted file mode 100644 index 710d0f02b785..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/lib/google/cloud/security/private_ca/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 Security - module PrivateCA - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb deleted file mode 100644 index 713e8a57dfed..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/security/private_ca" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Security::PrivateCA::ClientConstructionMinitest < 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_certificate_authority_service_grpc - skip unless Google::Cloud::Security::PrivateCA.certificate_authority_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Security::PrivateCA.certificate_authority_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client, client - end - end - - def test_certificate_authority_service_rest - skip unless Google::Cloud::Security::PrivateCA.certificate_authority_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Security::PrivateCA.certificate_authority_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb b/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.rb deleted file mode 100644 index 155f19753fba..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/test/google/cloud/security/private_ca/version_test.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 "helper" -require "google/cloud/security/private_ca/version" - -class Google::Cloud::Security::PrivateCA::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Security::PrivateCA::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-security-public_ca/.gitignore b/owl-bot-staging/google-cloud-security-public_ca/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json b/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json deleted file mode 100644 index 3aa27a366c8d..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "publicca.googleapis.com", - "api_shortname": "publicca", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca/latest", - "distribution_name": "google-cloud-security-public_ca", - "is_cloud": true, - "language": "ruby", - "name": "publicca", - "name_pretty": "Public Certificate Authority API", - "product_documentation": "https://cloud.google.com/certificate-manager/docs/public-ca/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic.", - "ruby-cloud-product-url": "https://cloud.google.com/certificate-manager/docs/public-ca/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml b/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml deleted file mode 100644 index 011570c346df..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security-public_ca.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-security-public_ca.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security-public_ca/.toys.rb b/owl-bot-staging/google-cloud-security-public_ca/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/.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-security-public_ca/.yardopts b/owl-bot-staging/google-cloud-security-public_ca/.yardopts deleted file mode 100644 index 21b229b9489f..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Public Certificate Authority API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md deleted file mode 100644 index 8076eb88c352..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security-public_ca 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-security-public_ca 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/security/public_ca" - -client = Google::Cloud::Security::PublicCA.public_certificate_authority_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security/public_ca" - -Google::Cloud::Security::PublicCA.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Security::PublicCA.public_certificate_authority_service -``` - -### 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-security-public_ca -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/security/public_ca" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Security::PublicCA.public_certificate_authority_service -``` - -### 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-security-public_ca/CHANGELOG.md b/owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security-public_ca/Gemfile b/owl-bot-staging/google-cloud-security-public_ca/Gemfile deleted file mode 100644 index b0f36d13850e..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-security-public_ca-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security-public_ca.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security-public_ca/LICENSE.md b/owl-bot-staging/google-cloud-security-public_ca/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/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-security-public_ca/README.md b/owl-bot-staging/google-cloud-security-public_ca/README.md deleted file mode 100644 index 6667cc1e58c8..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Public Certificate Authority API - -API Client library for the Public Certificate Authority API - -Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-security-public_ca-v*`. -The gem `google-cloud-security-public_ca` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca/latest) -for this library, google-cloud-security-public_ca, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-security-public_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/certificate-manager/docs/public-ca/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-security-public_ca -``` - -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/publicca.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/security/public_ca" - -client = Google::Cloud::Security::PublicCA.public_certificate_authority_service -request = ::Google::Cloud::Security::PublicCA::V1::CreateExternalAccountKeyRequest.new # (request fields as keyword arguments...) -response = client.create_external_account_key request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-security-public_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security-public_ca`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security-public_ca-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-security-public_ca`. -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-security-public_ca-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-security-public_ca/Rakefile b/owl-bot-staging/google-cloud-security-public_ca/Rakefile deleted file mode 100644 index dd0c72029fb3..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/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 = true -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-security-public_ca 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/security/public_ca/v1/public_certificate_authority_service/credentials" - ::Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::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-security-public_ca 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-security-public_ca 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-security-public_ca 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-security-public_ca gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security-public_ca" - header "google-cloud-security-public_ca rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security-public_ca yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security-public_ca 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-security-public_ca 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-security-public_ca 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-security-public_ca/google-cloud-security-public_ca.gemspec b/owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec deleted file mode 100644 index 1cdf012d758e..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/google-cloud-security-public_ca.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security/public_ca/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security-public_ca" - gem.version = Google::Cloud::Security::PublicCA::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. Certificate Manager lets you directly and programmatically request publicly trusted TLS certificates that are already in the root of trust stores used by major browsers, operating systems, and applications. You can use these TLS certificates to authenticate and encrypt internet traffic." - gem.summary = "API Client library for the Public Certificate Authority 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-security-public_ca-v1", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb deleted file mode 100644 index 02d86471dd61..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/lib/google-cloud-security-public_ca.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/public_ca" unless defined? Google::Cloud::Security::PublicCA::VERSION diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb deleted file mode 100644 index e74a9eb7a405..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/security/public_ca/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :security_public_ca do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Security - module PublicCA - ## - # Create a new client object for PublicCertificateAuthorityService. - # - # By default, this returns an instance of - # [Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1/latest/Google-Cloud-Security-PublicCA-V1-PublicCertificateAuthorityService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the PublicCertificateAuthorityService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the PublicCertificateAuthorityService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Security::PublicCA.public_certificate_authority_service_available?}. - # - # ## About PublicCertificateAuthorityService - # - # Manages the resources required for ACME [external account - # binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for - # the public certificate authority service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.public_certificate_authority_service version: :v1, transport: :grpc, &block - require "google/cloud/security/public_ca/#{version.to_s.downcase}" - - package_name = Google::Cloud::Security::PublicCA - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Security::PublicCA.const_get(package_name).const_get(:PublicCertificateAuthorityService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the PublicCertificateAuthorityService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Security::PublicCA.public_certificate_authority_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the PublicCertificateAuthorityService service, - # or if the versioned client gem needs an update to support the PublicCertificateAuthorityService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.public_certificate_authority_service_available? version: :v1, transport: :grpc - require "google/cloud/security/public_ca/#{version.to_s.downcase}" - package_name = Google::Cloud::Security::PublicCA - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Security::PublicCA.const_get package_name - return false unless service_module.const_defined? :PublicCertificateAuthorityService - service_module = service_module.const_get :PublicCertificateAuthorityService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-security-public_ca library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.security_public_ca if block_given? - - ::Google::Cloud.configure.security_public_ca - end - end - end - end -end - -helper_path = ::File.join __dir__, "public_ca", "helpers.rb" -require "google/cloud/security/public_ca/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb b/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/version.rb deleted file mode 100644 index 8ed789ab67bd..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/lib/google/cloud/security/public_ca/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 Security - module PublicCA - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb deleted file mode 100644 index 5362979abaf9..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/security/public_ca" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Security::PublicCA::ClientConstructionMinitest < 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_public_certificate_authority_service_grpc - skip unless Google::Cloud::Security::PublicCA.public_certificate_authority_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Security::PublicCA.public_certificate_authority_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Client, client - end - end - - def test_public_certificate_authority_service_rest - skip unless Google::Cloud::Security::PublicCA.public_certificate_authority_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Security::PublicCA.public_certificate_authority_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Security::PublicCA::V1::PublicCertificateAuthorityService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb b/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.rb deleted file mode 100644 index 90b9af92bc5c..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/test/google/cloud/security/public_ca/version_test.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 "helper" -require "google/cloud/security/public_ca/version" - -class Google::Cloud::Security::PublicCA::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Security::PublicCA::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb b/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security-public_ca/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-security_center/.gitignore b/owl-bot-staging/google-cloud-security_center/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center/.repo-metadata.json deleted file mode 100644 index 3ddbc21b11d6..000000000000 --- a/owl-bot-staging/google-cloud-security_center/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "securitycenter.googleapis.com", - "api_shortname": "securitycenter", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center/latest", - "distribution_name": "google-cloud-security_center", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Security Command Center API", - "product_documentation": "https://cloud.google.com/security-command-center", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", - "ruby-cloud-env-prefix": "SECURITY_CENTER", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-security_center/.rubocop.yml b/owl-bot-staging/google-cloud-security_center/.rubocop.yml deleted file mode 100644 index c8a023b8c970..000000000000 --- a/owl-bot-staging/google-cloud-security_center/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-security_center.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security_center/.toys.rb b/owl-bot-staging/google-cloud-security_center/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center/.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-security_center/.yardopts b/owl-bot-staging/google-cloud-security_center/.yardopts deleted file mode 100644 index c91fb9cbddc0..000000000000 --- a/owl-bot-staging/google-cloud-security_center/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Security Command Center API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md deleted file mode 100644 index 95e72c13be42..000000000000 --- a/owl-bot-staging/google-cloud-security_center/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center 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-security_center 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/security_center" - -client = Google::Cloud::SecurityCenter.security_center do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center" - -Google::Cloud::SecurityCenter.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::SecurityCenter.security_center -``` - -### 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-security_center -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/security_center" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::SecurityCenter.security_center -``` - -### 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-security_center/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center/Gemfile b/owl-bot-staging/google-cloud-security_center/Gemfile deleted file mode 100644 index 9ea5b10b9d72..000000000000 --- a/owl-bot-staging/google-cloud-security_center/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-security_center-v1", "google-cloud-security_center-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security_center.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center/LICENSE.md b/owl-bot-staging/google-cloud-security_center/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center/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-security_center/README.md b/owl-bot-staging/google-cloud-security_center/README.md deleted file mode 100644 index df1ec92c5ce5..000000000000 --- a/owl-bot-staging/google-cloud-security_center/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# Ruby Client for the Security Command Center API - -API Client library for the Security Command Center API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-security_center-v*`. -The gem `google-cloud-security_center` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center/latest) -for this library, google-cloud-security_center, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-security_center-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest), -[google-cloud-security_center-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest). - -See also the [Product Documentation](https://cloud.google.com/security-command-center) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-security_center -``` - -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/securitycenter.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/security_center" - -client = Google::Cloud::SecurityCenter.security_center -request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) -response = client.batch_create_resource_value_configs request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-security_center-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest), -[google-cloud-security_center-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security_center`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security_center-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-security_center`. -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-security_center-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-security_center/Rakefile b/owl-bot-staging/google-cloud-security_center/Rakefile deleted file mode 100644 index 84bd60853024..000000000000 --- a/owl-bot-staging/google-cloud-security_center/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 = true -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-security_center acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SECURITY_CENTER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SECURITY_CENTER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SECURITY_CENTER_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 SECURITY_CENTER_TEST_PROJECT=test123 SECURITY_CENTER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/security_center/v2/security_center/credentials" - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SECURITY_CENTER_PROJECT"] = project - ENV["SECURITY_CENTER_TEST_PROJECT"] = project - ENV["SECURITY_CENTER_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-security_center 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-security_center 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-security_center 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-security_center gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center" - header "google-cloud-security_center rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center 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-security_center 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-security_center 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-security_center/google-cloud-security_center.gemspec b/owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec deleted file mode 100644 index bc6a40b370d3..000000000000 --- a/owl-bot-staging/google-cloud-security_center/google-cloud-security_center.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center" - gem.version = Google::Cloud::SecurityCenter::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Security Command Center API provides access to temporal views of assets and findings within an organization." - gem.summary = "API Client library for the Security Command Center 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-security_center-v1", "~> 1.0" - gem.add_dependency "google-cloud-security_center-v2", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb b/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb deleted file mode 100644 index fe6260d8dad8..000000000000 --- a/owl-bot-staging/google-cloud-security_center/lib/google-cloud-security_center.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center" unless defined? Google::Cloud::SecurityCenter::VERSION diff --git a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb deleted file mode 100644 index 9b56b412b55e..000000000000 --- a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/security_center/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :security_center do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module SecurityCenter - ## - # Create a new client object for SecurityCenter. - # - # By default, this returns an instance of - # [Google::Cloud::SecurityCenter::V2::SecurityCenter::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-SecurityCenter-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SecurityCenter service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SecurityCenter service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SecurityCenter.security_center_available?}. - # - # ## About SecurityCenter - # - # V2 APIs for Security Center service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.security_center version: :v2, transport: :grpc, &block - require "google/cloud/security_center/#{version.to_s.downcase}" - - package_name = Google::Cloud::SecurityCenter - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SecurityCenter.const_get(package_name).const_get(:SecurityCenter) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SecurityCenter service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SecurityCenter.security_center}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SecurityCenter service, - # or if the versioned client gem needs an update to support the SecurityCenter service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.security_center_available? version: :v2, transport: :grpc - require "google/cloud/security_center/#{version.to_s.downcase}" - package_name = Google::Cloud::SecurityCenter - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SecurityCenter.const_get package_name - return false unless service_module.const_defined? :SecurityCenter - service_module = service_module.const_get :SecurityCenter - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-security_center library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.security_center if block_given? - - ::Google::Cloud.configure.security_center - end - end - end -end - -helper_path = ::File.join __dir__, "security_center", "helpers.rb" -require "google/cloud/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb b/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.rb deleted file mode 100644 index 74921f6d129f..000000000000 --- a/owl-bot-staging/google-cloud-security_center/lib/google/cloud/security_center/version.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! - - -module Google - module Cloud - module SecurityCenter - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb deleted file mode 100644 index 8c3f1e06dfe4..000000000000 --- a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/security_center" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::SecurityCenter::ClientConstructionMinitest < 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_security_center_grpc - skip unless Google::Cloud::SecurityCenter.security_center_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SecurityCenter.security_center transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client, client - end - end - - def test_security_center_rest - skip unless Google::Cloud::SecurityCenter.security_center_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::SecurityCenter.security_center transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb b/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.rb deleted file mode 100644 index 437d0c72c376..000000000000 --- a/owl-bot-staging/google-cloud-security_center/test/google/cloud/security_center/version_test.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 "helper" -require "google/cloud/security_center/version" - -class Google::Cloud::SecurityCenter::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::SecurityCenter::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-security_center/test/helper.rb b/owl-bot-staging/google-cloud-security_center/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-security_center_management/.gitignore b/owl-bot-staging/google-cloud-security_center_management/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json deleted file mode 100644 index 6d4ca5e755c9..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "securitycentermanagement.googleapis.com", - "api_shortname": "securitycentermanagement", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management/latest", - "distribution_name": "google-cloud-security_center_management", - "is_cloud": true, - "language": "ruby", - "name": "securitycentermanagement", - "name_pretty": "Security Command Center Management API", - "product_documentation": "https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center.", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml b/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml deleted file mode 100644 index 1a767b2ca887..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center_management.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-security_center_management.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-security_center_management/.toys.rb b/owl-bot-staging/google-cloud-security_center_management/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/.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-security_center_management/.yardopts b/owl-bot-staging/google-cloud-security_center_management/.yardopts deleted file mode 100644 index 716be9fa4724..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Security Command Center Management API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md deleted file mode 100644 index 438c3f974b75..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center_management 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-security_center_management 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/security_center_management" - -client = Google::Cloud::SecurityCenterManagement.security_center_management do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center_management" - -Google::Cloud::SecurityCenterManagement.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::SecurityCenterManagement.security_center_management -``` - -### 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-security_center_management -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/security_center_management" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::SecurityCenterManagement.security_center_management -``` - -### 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-security_center_management/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center_management/Gemfile b/owl-bot-staging/google-cloud-security_center_management/Gemfile deleted file mode 100644 index 4181426cc4c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-security_center_management-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-security_center_management.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-security_center_management/LICENSE.md b/owl-bot-staging/google-cloud-security_center_management/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/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-security_center_management/README.md b/owl-bot-staging/google-cloud-security_center_management/README.md deleted file mode 100644 index 1681c13bcbf2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Security Command Center Management API - -Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center. - -Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-security_center_management-v*`. -The gem `google-cloud-security_center_management` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management/latest) -for this library, google-cloud-security_center_management, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-security_center_management-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-security_center_management -``` - -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/securitycentermanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/security_center_management" - -client = Google::Cloud::SecurityCenterManagement.security_center_management -request = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new # (request fields as keyword arguments...) -response = client.list_effective_security_health_analytics_custom_modules request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-security_center_management-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security_center_management`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security_center_management-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-security_center_management`. -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-security_center_management-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-security_center_management/Rakefile b/owl-bot-staging/google-cloud-security_center_management/Rakefile deleted file mode 100644 index ae4211523697..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/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 = true -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-security_center_management 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/security_center_management/v1/security_center_management/credentials" - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::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-security_center_management 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-security_center_management 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-security_center_management 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-security_center_management gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center_management" - header "google-cloud-security_center_management rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center_management yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center_management 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-security_center_management 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-security_center_management 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-security_center_management/google-cloud-security_center_management.gemspec b/owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec deleted file mode 100644 index e9ce96242ddd..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/google-cloud-security_center_management.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center_management/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center_management" - gem.version = Google::Cloud::SecurityCenterManagement::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center." - gem.summary = "Management API for Security Command Center, a built-in security and risk management solution for Google Cloud. Use this API to programmatically update the settings and configuration of Security Command Center." - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-security_center_management-v1", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb deleted file mode 100644 index 64a6361608f1..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/lib/google-cloud-security_center_management.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center_management" unless defined? Google::Cloud::SecurityCenterManagement::VERSION diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb deleted file mode 100644 index 8c0d3abc31df..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/security_center_management/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :security_center_management do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module SecurityCenterManagement - ## - # Create a new client object for SecurityCenterManagement. - # - # By default, this returns an instance of - # [Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest/Google-Cloud-SecurityCenterManagement-V1-SecurityCenterManagement-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the SecurityCenterManagement service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the SecurityCenterManagement service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::SecurityCenterManagement.security_center_management_available?}. - # - # ## About SecurityCenterManagement - # - # Service describing handlers for resources - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.security_center_management version: :v1, transport: :grpc, &block - require "google/cloud/security_center_management/#{version.to_s.downcase}" - - package_name = Google::Cloud::SecurityCenterManagement - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::SecurityCenterManagement.const_get(package_name).const_get(:SecurityCenterManagement) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the SecurityCenterManagement service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::SecurityCenterManagement.security_center_management}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the SecurityCenterManagement service, - # or if the versioned client gem needs an update to support the SecurityCenterManagement service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.security_center_management_available? version: :v1, transport: :grpc - require "google/cloud/security_center_management/#{version.to_s.downcase}" - package_name = Google::Cloud::SecurityCenterManagement - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::SecurityCenterManagement.const_get package_name - return false unless service_module.const_defined? :SecurityCenterManagement - service_module = service_module.const_get :SecurityCenterManagement - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-security_center_management library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.security_center_management if block_given? - - ::Google::Cloud.configure.security_center_management - end - end - end -end - -helper_path = ::File.join __dir__, "security_center_management", "helpers.rb" -require "google/cloud/security_center_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb b/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.rb deleted file mode 100644 index 2c8ac752f525..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/lib/google/cloud/security_center_management/version.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! - - -module Google - module Cloud - module SecurityCenterManagement - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb deleted file mode 100644 index 0b41e9e51f38..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/security_center_management" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::SecurityCenterManagement::ClientConstructionMinitest < 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_security_center_management_grpc - skip unless Google::Cloud::SecurityCenterManagement.security_center_management_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::SecurityCenterManagement.security_center_management transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client, client - end - end - - def test_security_center_management_rest - skip unless Google::Cloud::SecurityCenterManagement.security_center_management_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::SecurityCenterManagement.security_center_management transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb b/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.rb deleted file mode 100644 index 0e5abb53009e..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/test/google/cloud/security_center_management/version_test.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 "helper" -require "google/cloud/security_center_management/version" - -class Google::Cloud::SecurityCenterManagement::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::SecurityCenterManagement::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management/test/helper.rb b/owl-bot-staging/google-cloud-security_center_management/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-service_control/.gitignore b/owl-bot-staging/google-cloud-service_control/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_control/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-service_control/.repo-metadata.json b/owl-bot-staging/google-cloud-service_control/.repo-metadata.json deleted file mode 100644 index 704c7c42ac47..000000000000 --- a/owl-bot-staging/google-cloud-service_control/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "servicecontrol.googleapis.com", - "api_shortname": "servicecontrol", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_control/latest", - "distribution_name": "google-cloud-service_control", - "is_cloud": true, - "language": "ruby", - "name": "servicecontrol", - "name_pretty": "Service Control API API", - "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks.", - "ruby-cloud-env-prefix": "SERVICE_CONTROL", - "ruby-cloud-product-url": "https://cloud.google.com/service-infrastructure/docs/overview/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-service_control/.rubocop.yml b/owl-bot-staging/google-cloud-service_control/.rubocop.yml deleted file mode 100644 index c65590c8bd8f..000000000000 --- a/owl-bot-staging/google-cloud-service_control/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_control.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-service_control.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-service_control/.toys.rb b/owl-bot-staging/google-cloud-service_control/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_control/.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-service_control/.yardopts b/owl-bot-staging/google-cloud-service_control/.yardopts deleted file mode 100644 index a184c4dff235..000000000000 --- a/owl-bot-staging/google-cloud-service_control/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Service Control API API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md deleted file mode 100644 index 594950fc3fe6..000000000000 --- a/owl-bot-staging/google-cloud-service_control/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_control 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-service_control 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/service_control" - -client = Google::Cloud::ServiceControl.quota_controller do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_control" - -Google::Cloud::ServiceControl.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::ServiceControl.quota_controller -``` - -### 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-service_control -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/service_control" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::ServiceControl.quota_controller -``` - -### 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-service_control/CHANGELOG.md b/owl-bot-staging/google-cloud-service_control/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_control/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_control/Gemfile b/owl-bot-staging/google-cloud-service_control/Gemfile deleted file mode 100644 index 7c9d9fbef522..000000000000 --- a/owl-bot-staging/google-cloud-service_control/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-service_control-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-service_control.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-service_control/LICENSE.md b/owl-bot-staging/google-cloud-service_control/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_control/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-service_control/README.md b/owl-bot-staging/google-cloud-service_control/README.md deleted file mode 100644 index 4062628d293a..000000000000 --- a/owl-bot-staging/google-cloud-service_control/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Service Control API API - -API Client library for the Service Control API API - -The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-service_control-v*`. -The gem `google-cloud-service_control` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control/latest) -for this library, google-cloud-service_control, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-service_control-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-service_control -``` - -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/servicecontrol.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/service_control" - -client = Google::Cloud::ServiceControl.quota_controller -request = ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new # (request fields as keyword arguments...) -response = client.allocate_quota request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-service_control-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-service_control`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-service_control-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-service_control`. -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-service_control-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-service_control/Rakefile b/owl-bot-staging/google-cloud-service_control/Rakefile deleted file mode 100644 index 71014908742d..000000000000 --- a/owl-bot-staging/google-cloud-service_control/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 = true -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-service_control acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SERVICE_CONTROL_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SERVICE_CONTROL_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SERVICE_CONTROL_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 SERVICE_CONTROL_TEST_PROJECT=test123 SERVICE_CONTROL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/service_control/v1/quota_controller/credentials" - ::Google::Cloud::ServiceControl::V1::QuotaController::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SERVICE_CONTROL_PROJECT"] = project - ENV["SERVICE_CONTROL_TEST_PROJECT"] = project - ENV["SERVICE_CONTROL_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-service_control 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-service_control 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-service_control 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-service_control gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_control" - header "google-cloud-service_control rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_control yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_control 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-service_control 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-service_control 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-service_control/google-cloud-service_control.gemspec b/owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec deleted file mode 100644 index 27cf1bb4a576..000000000000 --- a/owl-bot-staging/google-cloud-service_control/google-cloud-service_control.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_control/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_control" - gem.version = Google::Cloud::ServiceControl::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks." - gem.summary = "API Client library for the Service Control API 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-service_control-v1", ">= 0.9", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb b/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb deleted file mode 100644 index dd4b9fda45e0..000000000000 --- a/owl-bot-staging/google-cloud-service_control/lib/google-cloud-service_control.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_control" unless defined? Google::Cloud::ServiceControl::VERSION diff --git a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb deleted file mode 100644 index aab78a11e486..000000000000 --- a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control.rb +++ /dev/null @@ -1,234 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/service_control/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :service_control do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module ServiceControl - ## - # Create a new client object for QuotaController. - # - # By default, this returns an instance of - # [Google::Cloud::ServiceControl::V1::QuotaController::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-QuotaController-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the QuotaController service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the QuotaController service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ServiceControl.quota_controller_available?}. - # - # ## About QuotaController - # - # [Google Quota Control API](https://cloud.google.com/service-control/overview) - # - # Allows clients to allocate and release quota against a [managed - # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService). - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.quota_controller version: :v1, transport: :grpc, &block - require "google/cloud/service_control/#{version.to_s.downcase}" - - package_name = Google::Cloud::ServiceControl - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ServiceControl.const_get(package_name).const_get(:QuotaController) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the QuotaController service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ServiceControl.quota_controller}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the QuotaController service, - # or if the versioned client gem needs an update to support the QuotaController service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.quota_controller_available? version: :v1, transport: :grpc - require "google/cloud/service_control/#{version.to_s.downcase}" - package_name = Google::Cloud::ServiceControl - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ServiceControl.const_get package_name - return false unless service_module.const_defined? :QuotaController - service_module = service_module.const_get :QuotaController - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for ServiceController. - # - # By default, this returns an instance of - # [Google::Cloud::ServiceControl::V1::ServiceController::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest/Google-Cloud-ServiceControl-V1-ServiceController-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the ServiceController service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the ServiceController service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::ServiceControl.service_controller_available?}. - # - # ## About ServiceController - # - # [Google Service Control - # API](https://cloud.google.com/service-control/overview) - # - # Lets clients check and report operations against a [managed - # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService). - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.service_controller version: :v1, transport: :grpc, &block - require "google/cloud/service_control/#{version.to_s.downcase}" - - package_name = Google::Cloud::ServiceControl - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::ServiceControl.const_get(package_name).const_get(:ServiceController) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the ServiceController service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::ServiceControl.service_controller}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the ServiceController service, - # or if the versioned client gem needs an update to support the ServiceController service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.service_controller_available? version: :v1, transport: :grpc - require "google/cloud/service_control/#{version.to_s.downcase}" - package_name = Google::Cloud::ServiceControl - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::ServiceControl.const_get package_name - return false unless service_module.const_defined? :ServiceController - service_module = service_module.const_get :ServiceController - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-service_control library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.service_control if block_given? - - ::Google::Cloud.configure.service_control - end - end - end -end - -helper_path = ::File.join __dir__, "service_control", "helpers.rb" -require "google/cloud/service_control/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb b/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.rb deleted file mode 100644 index 1dc46c9b882b..000000000000 --- a/owl-bot-staging/google-cloud-service_control/lib/google/cloud/service_control/version.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! - - -module Google - module Cloud - module ServiceControl - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.rb deleted file mode 100644 index 6c5e27771a35..000000000000 --- a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/client_test.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! - -require "helper" -require "google/cloud/service_control" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::ServiceControl::ClientConstructionMinitest < 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_quota_controller_grpc - skip unless Google::Cloud::ServiceControl.quota_controller_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ServiceControl.quota_controller transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ServiceControl::V1::QuotaController::Client, client - end - end - - def test_quota_controller_rest - skip unless Google::Cloud::ServiceControl.quota_controller_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ServiceControl.quota_controller transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client, client - end - end - - def test_service_controller_grpc - skip unless Google::Cloud::ServiceControl.service_controller_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::ServiceControl.service_controller transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::ServiceControl::V1::ServiceController::Client, client - end - end - - def test_service_controller_rest - skip unless Google::Cloud::ServiceControl.service_controller_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::ServiceControl.service_controller transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb b/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.rb deleted file mode 100644 index 6b1cc8ae1ce3..000000000000 --- a/owl-bot-staging/google-cloud-service_control/test/google/cloud/service_control/version_test.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 "helper" -require "google/cloud/service_control/version" - -class Google::Cloud::ServiceControl::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::ServiceControl::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-service_control/test/helper.rb b/owl-bot-staging/google-cloud-service_control/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_control/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"